Bug 629441 (CVE-2010-3067)

Summary: CVE-2010-3067 kernel: do_io_submit() infoleak
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: low Docs Contact:
Priority: low    
Version: unspecifiedCC: arozansk, bhu, dfeng, dhoward, jkacur, jlieskov, jmoyer, jolsa, lgoncalv, peterm, plyons, rkhan, security-response-team, tao, vgoyal, williams, yugzhang
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: 2021-10-19 09:14:08 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: 629444, 629445, 629446, 629447, 629448, 629449, 629450, 629451    
Bug Blocks:    

Description Eugene Teo (Security Response) 2010-09-02 01:48:50 UTC
Description of problem:
This doesn't look correct, the io_submit systemcall calls do_io_submit() directly:

SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr,
        struct iocb __user * __user *, iocbpp)
{
    return do_io_submit(ctx_id, nr, iocbpp, 0);
}

do_io_submit only checks if nr < 0, but doesnt check if the access_ok
multiplication will overflow.

long do_io_submit(aio_context_t ctx_id, long nr,
          struct iocb __user *__user *iocbpp, bool compat)
{
...
    if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp)))))
        return -EFAULT;
...

Then it uses this loop with __get_user_nocheck(), which doesn't look safe.

...
    for (i=0; i<nr; i++) {
        struct iocb __user *user_iocb;
        struct iocb tmp;

        if (unlikely(__get_user(user_iocb, iocbpp + i))) {
            ret = -EFAULT;
            break;
        }
...

Acknowledgements:

Red Hat would like to thank Tavis Ormandy for reporting this issue.

Comment 8 errata-xmlrpc 2010-10-08 02:12:29 UTC
This issue has been addressed in following products:

  MRG for RHEL-5

Via RHSA-2010:0758 https://rhn.redhat.com/errata/RHSA-2010-0758.html

Comment 11 errata-xmlrpc 2010-10-19 18:48:08 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2010:0779 https://rhn.redhat.com/errata/RHSA-2010-0779.html

Comment 12 errata-xmlrpc 2010-11-09 18:06:43 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0839 https://rhn.redhat.com/errata/RHSA-2010-0839.html

Comment 13 errata-xmlrpc 2011-01-11 19:46:01 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