Bug 1317383 (CVE-2016-3134) - CVE-2016-3134 kernel: netfilter: missing bounds check in ipt_entry structure
Summary: CVE-2016-3134 kernel: netfilter: missing bounds check in ipt_entry structure
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-3134
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: 1320138 (view as bug list)
Depends On: 1317384 1318693 1318694 1318695 1318696 1364809 1364810
Blocks: 1317388 1320141
TreeView+ depends on / blocked
 
Reported: 2016-03-14 07:43 UTC by Andrej Nemec
Modified: 2021-02-17 04:10 UTC (History)
33 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A security flaw was found in the Linux kernel in the mark_source_chains() function in "net/ipv4/netfilter/ip_tables.c". It is possible for a user-supplied "ipt_entry" structure to have a large "next_offset" field. This field is not bounds checked prior to writing to a counter value at the supplied offset.
Clone Of:
Environment:
Last Closed: 2019-06-08 02:49:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1847 0 normal SHIPPED_LIVE Important: kernel security, bug fix, and enhancement update 2016-09-15 11:38:04 UTC
Red Hat Product Errata RHSA-2016:1875 0 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2016-09-15 11:39:21 UTC
Red Hat Product Errata RHSA-2016:1883 0 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2016-09-15 03:41:02 UTC

Description Andrej Nemec 2016-03-14 07:43:31 UTC
In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset.

Proposed fix:

patch v1 message: http://marc.info/?l=netfilter-devel&m=145757134822741&w=2
patch v2  thread: http://marc.info/?t=145757149500006&r=1&w=2

patch v2 message: http://marc.info/?l=netfilter-devel&m=145762719008418&w=2
patch v2  thread: (none yet) http://marc.info/?l=netfilter-devel&r=4&b=201603&w=2

CVE request and assignment:

http://seclists.org/oss-sec/2016/q1/581
http://seclists.org/oss-sec/2016/q1/619

Audit done by netfilter team found several related bugs, patches to better validate rulesets are currently queued in pablos nf-next tree upstream (use "parent" link to cycle to next one - there are 17 additional patches):

https://git.kernel.org/cgit/linux/kernel/git/pablo/nf-next.git/commit/?id=d7591f0c41ce3e67600a982bab6989ef0f07b3ce

Comment 1 Andrej Nemec 2016-03-14 07:44:13 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1317384]

Comment 4 Vladis Dronov 2016-03-17 13:43:07 UTC
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6. This issue is not currently planned to be addressed in future updates, as user namespaces which the flaw affects are not supported in these products. 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 and MRG-2. Future Linux kernel updates for the respective releases might address this issue.

Comment 9 Petr Matousek 2016-03-22 12:46:30 UTC
*** Bug 1320138 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2016-03-23 22:25:14 UTC
kernel-4.4.6-300.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 Fedora Update System 2016-03-24 00:00:01 UTC
kernel-4.4.6-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 12 Fedora Update System 2016-04-02 00:41:48 UTC
kernel-4.5.0-302.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-04-02 15:49:30 UTC
kernel-4.5.0-302.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Florian Westphal 2016-07-04 11:26:14 UTC
I'd prefer if the maintainers of those trees can take care of picking these patches up since I don't know how to do this.

All changes are now in rhel7.git .  I only see a problem with older
rhel7 kernels (where netfilter rule blob is percpu), if 7.1 and 7.2 releases need a zstream please let me know.

If there are any other questions feel free to ping me.

Comment 21 errata-xmlrpc 2016-09-14 23:42:27 UTC
This issue has been addressed in the following products:

  MRG for RHEL-6 v.2

Via RHSA-2016:1883 https://rhn.redhat.com/errata/RHSA-2016-1883.html

Comment 22 errata-xmlrpc 2016-09-15 08:01:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:1847 https://rhn.redhat.com/errata/RHSA-2016-1847.html

Comment 23 errata-xmlrpc 2016-09-15 08:10:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:1875 https://rhn.redhat.com/errata/RHSA-2016-1875.html


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