Bug 165092 - Bugs in kernel key managment syscall interface
Summary: Bugs in kernel key managment syscall interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: David Howells
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 168429
TreeView+ depends on / blocked
 
Reported: 2005-08-04 10:24 UTC by David Howells
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHSA-2006-0132
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-07 19:29:38 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:808 0 normal SHIPPED_LIVE Important: kernel security update 2005-10-27 04:00:00 UTC
Red Hat Product Errata RHSA-2006:0132 0 qe-ready SHIPPED_LIVE Moderate: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 3 2006-03-09 16:31:00 UTC

Description David Howells 2005-08-04 10:24:23 UTC
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:
Always

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  
<keyid>  
 
(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 10:27:14 UTC
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 19:29:38 UTC
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.

http://rhn.redhat.com/errata/RHSA-2006-0132.html



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