Bug 641410 (CVE-2010-4242)

Summary: CVE-2010-4242 kernel: missing tty ops write function presence check in hci_uart_tty_open()
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arozansk, bhu, davej, dhoward, eteo, fhrbata, jkacur, jolsa, jpirko, kmcmartin, lgoncalv, lwang, plyons, security-response-team, tcallawa, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 08:43:48 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: 655661, 655662, 655663, 655664, 655666, 655667, 655668    
Bug Blocks:    

Description Petr Matousek 2010-10-08 15:55:48 UTC
Problem description:

hci_uart_tty_open() is missing check that tty has a write op (a few don't), and you should check this at open and refuse if the ops you need don't exist (eg as SLIP does:

static int slip_open(struct tty_struct *tty)
{
        struct slip *sl;
        int err;

        if (!capable(CAP_NET_ADMIN))
                return -EPERM;

        if (tty->ops->write == NULL)
                return -EOPNOTSUPP;

Fortunately almost no system will have a driver loaded which lacks a write op, but this should be fixed.

Comment 1 Eugene Teo (Security Response) 2010-10-11 04:23:47 UTC
Discussion:
http://lkml.org/lkml/2010/10/7/255

Comment 2 Eugene Teo (Security Response) 2010-11-22 04:59:05 UTC
Upstream commit:
http://git.kernel.org/linus/c19483cc5e56ac5e22dd19cf25ba210ab1537773

Comment 6 Eugene Teo (Security Response) 2010-12-15 03:55:56 UTC
Acknowledgements:

Red Hat would like to thank Alan Cox for reporting this issue.

Comment 7 errata-xmlrpc 2011-01-04 16:52:36 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:0004 https://rhn.redhat.com/errata/RHSA-2011-0004.html

Comment 8 errata-xmlrpc 2011-01-11 19:45:06 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:0007 https://rhn.redhat.com/errata/RHSA-2011-0007.html

Comment 9 errata-xmlrpc 2011-01-18 17:45:10 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2011:0162 https://rhn.redhat.com/errata/RHSA-2011-0162.html

Comment 11 errata-xmlrpc 2011-03-10 20:04:18 UTC
This issue has been addressed in following products:

  MRG for RHEL-5

Via RHSA-2011:0330 https://rhn.redhat.com/errata/RHSA-2011-0330.html