Bug 528887 (CVE-2009-2909)

Summary: CVE-2009-2909 kernel: ax25 stack overflow
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bressers, dhoward, jrusnack, kyle, lwang, pmatouse, tcallawa
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 531589 (view as bug list) Environment:
Last Closed: 2015-08-23 13:43:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 528888, 531589    
Bug Blocks:    

Description Eugene Teo (Security Response) 2009-10-14 08:25:22 UTC
Description of problem:
Quote from this email:
http://article.gmane.org/gmane.linux.kernel/896907

fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way

The ax25 code tried to use
        if (optlen < sizeof(int))
                return -EINVAL;

as a security check against optlen being negative (or zero) in the set socket option.

Unfortunately, "sizeof(int)" is an unsigned property, with the result that the whole comparison is done in unsigned, letting negative values slip through.

This patch changes this to
        if (optlen < (int)sizeof(int))
                return -EINVAL;

so that the comparison is done as signed, and negative values get properly caught.

References:
http://git.kernel.org/linus/b7058842c940ad2c08dd829b21e5c92ebe3b8758
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commit;h=b7058842c940ad2c08dd829b21e5c92ebe3b8758

Comment 2 Eugene Teo (Security Response) 2009-10-14 08:28:14 UTC
This issue did not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 4, 5, or Red Hat Enterprise MRG, as the affected driver is not enabled in these kernels.

The affected driver is available in Red Hat Enterprise Linux 3, but only if the kernel-unsupported package is installed.

Future kernel update in Red Hat Enterprise Linux 3 might address this flaw.

Comment 3 Fedora Update System 2009-10-15 00:21:20 UTC
kernel-2.6.27.37-170.2.104.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/kernel-2.6.27.37-170.2.104.fc10

Comment 4 Fedora Update System 2009-10-15 22:37:07 UTC
kernel-2.6.27.37-170.2.104.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2009-10-18 01:57:37 UTC
kernel-2.6.30.9-90.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kernel-2.6.30.9-90.fc11

Comment 6 Fedora Update System 2009-10-27 06:47:50 UTC
kernel-2.6.30.9-90.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.