Bug 1337528 (CVE-2016-4913) - CVE-2016-4913 kernel: Information leak when handling NM entries containing NUL
Summary: CVE-2016-4913 kernel: Information leak when handling NM entries containing NUL
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-4913
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1337529 Engineering1340778 Engineering1340779 Engineering1340780 Engineering1340781
Blocks: Embargoed1337530
TreeView+ depends on / blocked
 
Reported: 2016-05-19 11:52 UTC by Andrej Nemec
Modified: 2021-02-17 03:52 UTC (History)
29 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A vulnerability was found in the Linux kernel. Payloads of NM entries are not supposed to contain NUL. When such entry is processed, only the part prior to the first NUL goes into the concatenation (i.e. the directory entry name being encoded by a bunch of NM entries). The process stops when the amount collected so far + the claimed amount in the current NM entry exceed 254. However, the value returned as the total length is the sum of *claimed* sizes, not the actual amount collected. And that's what will be passed to readdir() callback as the name length - 8Kb __copy_to_user() from a buffer allocated by __get_free_page().
Clone Of:
Environment:
Last Closed: 2019-06-08 02:52:08 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3083 0 None None None 2018-10-30 07:30:43 UTC
Red Hat Product Errata RHSA-2018:3096 0 None None None 2018-10-30 07:36:56 UTC

Description Andrej Nemec 2016-05-19 11:52:21 UTC
A vulnerability was found in the Linux kernel. Payloads of NM entries are not supposed to contain NUL. When such entry is processed, only the part prior to the first NUL goes into the concatenation (i.e. the directory entry name being encoded by a bunch of NM entries).  The process stops when the amount collected so far + the claimed amount in the current NM entry exceed 254.

However, the value returned as the total length is the sum of *claimed* sizes, not the actual amount collected.  And that can grow pretty large - not unlimited, since you'd need to put CE entries in between to be able to get more than the maximum that could be contained in one isofs directory entry / continuation chunk and the process stops once it had encountered 32 CEs, but you can get about 8Kb easily.  And that's what will be passed to readdir callback as the name length.  8Kb __copy_to_user() from a buffer allocated by __get_free_page()

References, CVE-ID request and response:

http://seclists.org/oss-sec/2016/q2/363

http://seclists.org/oss-sec/2016/q2/365

Upstream fix:

https://git.kernel.org/linus/99d825822eade8d827a1817357cbf3f889a552d6

Comment 1 Andrej Nemec 2016-05-19 11:53:48 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1337529]

Comment 2 Fedora Update System 2016-05-24 18:03:15 UTC
kernel-4.5.5-300.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Vladis Dronov 2016-05-30 09:29:18 UTC
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6 and MRG-2. This has been rated as having Low security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7. Future Linux kernel updates for the respective releases might address this issue.

Comment 9 Fedora Update System 2016-06-01 20:23:26 UTC
kernel-4.4.11-200.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-06-02 14:58:01 UTC
kernel-4.5.5-201.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 errata-xmlrpc 2018-10-30 07:30:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:3083 https://access.redhat.com/errata/RHSA-2018:3083

Comment 12 errata-xmlrpc 2018-10-30 07:36:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:3096 https://access.redhat.com/errata/RHSA-2018:3096


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