Bug 113100 - CAN-2003-0465 kernel strncpy padding
Summary: CAN-2003-0465 kernel strncpy padding
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ernie Petrides
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 107562
TreeView+ depends on / blocked
 
Reported: 2004-01-08 15:29 UTC by Mark J. Cox
Modified: 2007-11-30 22:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-12 01:08:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The s390,s390x test fix (1.20 KB, patch)
2004-01-29 03:13 UTC, Pete Zaitcev
no flags Details | Diff
ppc64 patch (889 bytes, patch)
2004-01-29 12:18 UTC, Julie DeWandel
no flags Details | Diff
Correct s390 version from Martin (2.6) (1.87 KB, patch)
2004-01-29 16:17 UTC, Pete Zaitcev
no flags Details | Diff
Patch for generic kernel strncpy (788 bytes, patch)
2004-01-29 18:34 UTC, Jim Paradis
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:188 0 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 2 2004-05-11 04:00:00 UTC

Description Mark J. Cox 2004-01-08 15:29:14 UTC
CAN-2003-0465 The kernel strncpy function in Linux 2.4 and 2.5 does not
%NUL pad the buffer on architectures other than x86, as opposed to the
expected behavior of strncpy as implemented in libc, which could lead
to information leaks.
http://marc.theaimsgroup.com/?l=linux-kernel&m=105796021120436&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m=105796415223490&w=2
2.4: 1.1063.4.25 paulus|ChangeSet|20030812235114|14554
[hence fixed upstream in 2.4.22]

Not fixed up to 2.4.21-7.EL

Comment 5 Pete Zaitcev 2004-01-29 03:13:49 UTC
Created attachment 97323 [details]
The s390,s390x test fix

Comment 7 Julie DeWandel 2004-01-29 12:18:00 UTC
Created attachment 97329 [details]
ppc64 patch

Thought I'd follow Pete's lead and attach the ppc64 patch here as well.

Comment 8 Pete Zaitcev 2004-01-29 16:17:38 UTC
Created attachment 97337 [details]
Correct s390 version from Martin (2.6)

Comment 9 Jim Paradis 2004-01-29 18:34:28 UTC
Created attachment 97343 [details]
Patch for generic kernel strncpy

Amazingly enough, x86_64 doesn't have arch-specific string routines; it uses
the generic routines in lib (this is true upstream as well, for both 2.4 and
2.6)

Attached is a patch to drop-in the 2.6 version of strncpy, which does the right
thing.

Comment 10 Jason Baron 2004-01-29 18:41:13 UTC
ia64 uses the generic routines as well.

Comment 11 Ernie Petrides 2004-02-11 06:02:33 UTC
The fixes required to make the x86_64, ia64, ppc64, s390, and s390x
versions of strncpy() zero-pad the destination buffer were committed
to the RHEL3 U2 patch pool tonight.  They will first be available in
kernel version 2.4.21-9.7.EL.


Comment 12 John Flanagan 2004-05-12 01:08:15 UTC
An errata 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-2004-188.html



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