Bug 165092 - Bugs in kernel key managment syscall interface
Bugs in kernel key managment syscall interface
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Howells
Brian Brock
Depends On:
Blocks: 168429
  Show dependency treegraph
Reported: 2005-08-04 06:24 EDT by David Howells
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0132
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-07 14:29:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Key management syscall interface fixes (1.29 KB, patch)
2005-08-04 06:27 EDT, David Howells
no flags Details | Diff

  None (edit)
Description David Howells 2005-08-04 06:24:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)

Description of problem:
The testsuite for the key management utilities found five non-critical bugs in  
the key management syscall code:  
 (1) add_key() returns 0 rather than EINVAL if the key type is "".  
 (2) request_key() returns ENOKEY rather than EPERM if the key type begins  
with a ".".  
 (3) Key revocation always returns 0, even if it fails.  
 (4) Key read can return EAGAIN rather than EACCES under some circumstances.  
 (5) request_key() never adds the key to the destination keyring supplied.  

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
(1) keyctl add "" a a @p 
(2) keyctl request ".user" a  
(3) keyctl revoke @t  
(4) keyctl add user a a @s; keyctl setperm <keyid> 0x150000; keyctl print  
(5) keyctl request2 user debug:hello hello @u; keyctl list @u  

Actual Results:  (1)  Succeeds, indicating key ID 0.   
(2) Fails with "request_key: Requested key not available".  
(3) Succeeds silently.  
(4) Fails with "keyctl_read_alloc: Resource temporarily unavailable".  
(5) Prints the key ID and then says "keyring is empty" or, at least, the 
listing doesn't include the specified key ID. 

Expected Results:  (1) Fail with "add_key: No such device" 
(2) Fail with "request_key: Operation not permitted" 
(3) Fail with "keyctl_revoke: Requested key not available". 
(4) Fail with "keyctl_read_alloc: Permission denied". 
(5) Should show the new key ID in the keyring. 

Additional info:

These are tested for by the RHTS keyring testsuite.
Comment 1 David Howells 2005-08-04 06:27:14 EDT
Created attachment 117436 [details]
Key management syscall interface fixes

This patch fixes the aforementioned bugs in the key management interface.
Comment 5 Red Hat Bugzilla 2006-03-07 14:29:38 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.