Bug 1552048 (CVE-2018-1068)

Summary: CVE-2018-1068 kernel: Out-of-bounds write via userland offsets in ebt_entry struct in netfilter/ebtables.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: airlied, ajax, aquini, bhu, blc, bskeggs, carnil, dhoward, ewk, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarodwilson, jforbes, jglisse, jkacur, john.j5live, jonathan, josef, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, mmilgram, nmurray, plougher, ppandit, rt-maint, rvrbovsk, security-response-team, skozina, slawomir, steved, vdronov, williams, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-3.10.0-862.1.1.el7 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel's implementation of 32-bit syscall interface for bridging. This allowed a privileged user to arbitrarily write to a limited range of kernel memory.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:16:27 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: 1552364, 1552365, 1552366, 1552367, 1552368, 1552369, 1552370, 1557238, 1557239, 1695814, 1725182    
Bug Blocks: 1551689    

Description Pedro Sampaio 2018-03-06 12:06:52 UTC
A flaw was found in the latest Linux kernel. A out-of-bounds write of kernel address space may be triggered via uncontrolled userland provided offset in ebt_entry struct in netfilter/ebtables.c.

References:

https://marc.info/?l=linux-netdev&m=152023808817590&w=2

https://marc.info/?l=linux-netdev&m=152025888924151&w=2

An upsteam patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b71812168571fa55e44cdd0254471331b9c4c4c6

https://github.com/torvalds/linux/commit/b71812168571fa55e44cdd0254471331b9c4c4c6

Comment 4 Vladis Dronov 2018-03-13 11:50:03 UTC
Notes:

The related permission check in the kernel code is as follows:

[ net/bridge/netfilter/ebtables.c ]
static int compat_do_ebt_set_ctl(struct sock *sk, ...
{
        ...
        if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                return -EPERM;

This mean that this flaw can be exploited not only by a system's privileged user (a real "root" user), but also by an attacker who is a privileged user (a "root" user) in a user+network namespace, for example, on some container hosting. So, the impact of this flaw is rated as Important.

Comment 5 Vladis Dronov 2018-03-16 09:34:20 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1557238]

Comment 7 Fedora Update System 2018-03-20 17:36:10 UTC
kernel-4.15.10-200.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 errata-xmlrpc 2018-05-08 18:25:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 9 errata-xmlrpc 2018-05-08 22:24:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 10 errata-xmlrpc 2018-10-30 08:58:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 12 errata-xmlrpc 2019-05-14 19:08:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Extended Update Support

Via RHSA-2019:1170 https://access.redhat.com/errata/RHSA-2019:1170

Comment 13 errata-xmlrpc 2019-05-14 20:26:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2019:1190 https://access.redhat.com/errata/RHSA-2019:1190

Comment 15 errata-xmlrpc 2019-12-10 11:58:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Telco Extended Update Support
  Red Hat Enterprise Linux 7.3 Advanced Update Support
  Red Hat Enterprise Linux 7.3 Update Services for SAP Solutions

Via RHSA-2019:4159 https://access.redhat.com/errata/RHSA-2019:4159