Skip to content
OpenAdvisories
Unscored Public exploit CVE-2018-13405 EUVD-2018-5348GHSA-5p56-pcgw-42mf

The inode_init_owner function in fs/inode.c in the Linux kernel through 3.16 allows local users to create files with an unintended group ow…

Published Jul 6, 2018 · Updated Aug 5, 2024 · Assigned by mitre

Description

The inode_init_owner function in fs/inode.c in the Linux kernel through 3.16 allows local users to create files with an unintended group ownership, in a scenario where a directory is SGID to a certain group and is writable by a user who is not a member of that group. Here, the non-member can trigger creation of a plain file whose group ownership is that group. The intended behavior was that the non-member can trigger creation of a directory (but not a plain file) whose group ownership is that group. The non-member can escalate privileges by making the plain file executable and SGID.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 4.17.6-1 —
Debian 13 linux 4.17.6-1 —
Debian 12 linux 4.17.6-1 —
Debian 9 linux 4.9.110-3+deb9u1 DSA-4266-1
Debian 8 linux 3.16.59-1 DLA-1529-1
Debian 8 linux-4.9 4.9.110-3+deb9u2~deb8u1 DLA-1466-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS linux-raspi-realtime No fix yet —
Ubuntu 22.04 LTS linux-riscv +2 No fix yet —
Ubuntu 20.04 LTS linux-gke +3 No fix yet —
Ubuntu 18.04 LTS linux 4.15.0-33.36 USN-3752-1
Ubuntu 18.04 LTS linux-aws +1 4.15.0-1020.20 USN-3752-1
Ubuntu 18.04 LTS linux-azure 4.15.0-1022.23 USN-3752-3
Ubuntu 18.04 LTS linux-gcp 4.15.0-1018.19 USN-3752-1
Ubuntu 18.04 LTS linux-oem 4.15.0-1017.20 USN-3752-3
Ubuntu 18.04 LTS linux-raspi2 4.15.0-1021.23 USN-3752-1
Ubuntu 16.04 LTS linux 4.4.0-134.160 USN-3753-1
Ubuntu 16.04 LTS linux-aws 4.4.0-1066.76 USN-3753-1
Ubuntu 16.04 LTS linux-azure 4.15.0-1022.22~16.04.1 USN-3752-3
Ubuntu 16.04 LTS linux-gcp 4.15.0-1018.19~16.04.2 USN-3752-3
Ubuntu 16.04 LTS linux-hwe 4.15.0-33.36~16.04.1 USN-3752-2
Ubuntu 16.04 LTS linux-kvm 4.4.0-1032.38 USN-3753-1
Ubuntu 16.04 LTS linux-raspi2 4.4.0-1095.103 USN-3753-1
Ubuntu 16.04 LTS linux-snapdragon 4.4.0-1099.104 USN-3753-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS linux 3.13.0-157.207 USN-3754-1
Ubuntu 14.04 LTS linux-aws 4.4.0-1028.31 USN-3753-2
Ubuntu 14.04 LTS linux-lts-xenial 4.4.0-134.160~14.04.1 USN-3753-2
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips 4.4.0-1008.10 —
ReleasePackageFixed inAdvisory
RHEL 7 kernel-alt +1 4.14.0-115.el7a RHSA-2018:2948
RHEL 7 kernel-rt +10 3.10.0-957.rt56.910.el7 RHSA-2018:3096
RHEL 7 perf +18 3.10.0-957.el7 RHSA-2018:3083, RHSA-2018:2948
RHEL 6 perf +16 2.6.32-754.12.1.el6 RHSA-2019:0717
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 7.5 EUS perf +18 3.10.0-862.41.1.el7 RHSA-2019:2566
RHEL 7.4 EUS perf +17 3.10.0-693.58.1.el7 RHSA-2019:2696
RHEL 7.3 TUS perf +12 3.10.0-514.71.1.el7 RHSA-2019:4159
RHEL 7.3 E4S perf +14 3.10.0-514.71.1.el7 RHSA-2019:4159
RHEL 7.3 AUS perf +12 3.10.0-514.71.1.el7 RHSA-2019:4159
RHEL 7.2 TUS perf +12 3.10.0-327.83.1.el7 RHSA-2019:4164
RHEL 7.2 E4S perf +12 3.10.0-327.83.1.el7 RHSA-2019:4164
RHEL 7.2 AUS perf +12 3.10.0-327.83.1.el7 RHSA-2019:4164
RHEL 6.6 AUS perf +9 2.6.32-504.80.2.el6 RHSA-2019:2476
Red Hat MRG 2 kernel-rt +10 1:3.10.0-693.58.1.rt56.652.el6rt RHSA-2019:2730

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 libiscsi +2 1.18.0-8.module_el8.6.0+2880+7d9e3703 ALSA-2022:0886
AlmaLinux 8 libvirt-dbus 1.3.0-2.module_el8.6.0+2880+7d9e3703 ALSA-2022:0886
AlmaLinux 8 netcf +2 0.2.8-12.module_el8.6.0+2880+7d9e3703 ALSA-2022:0886
AlmaLinux 8 perf +19 4.18.0-372.9.1.el8 ALSA-2022:1988
AlmaLinux 8 qemu-img +9 15:4.2.0-59.module_el8.5.0+2629+68d2f392.2 ALSA-2022:0886
AlmaLinux 8 sgabios +1 1:0.20170427git-3.module_el8.6.0+2880+7d9e3703 ALSA-2022:0886
ReleasePackageFixed inAdvisory
SLES 15 SP1 kernel-docs +4 4.12.14-197.102.2 SUSE-SU-2021:3876-1
SLES 15 SP1 kernel-obs-build 4.12.14-197.102.1 SUSE-SU-2021:3876-1
SLES 15 kernel-azure +2 4.12.14-5.8.1 SUSE-SU-2018:2222-1
SLES 15 kernel-docs +6 4.12.14-25.3.1 SUSE-SU-2018:2092-1
SLES 12 SP5 kernel-docs +4 4.12.14-122.98.1 SUSE-SU-2021:3748-1
SLES 12 SP4 kernel-syms +2 4.12.14-95.83.2 SUSE-SU-2021:3972-1
SLES 12 SP3 kernel-docs +4 4.4.140-94.42.1 SUSE-SU-2021:3935-1, SUSE-SU-2018:2051-1
SLES 12 SP3 kgraft-patch-SLE12-SP3_Update_41 1-4.3.1 SUSE-SU-2021:3935-1
Show 25 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP2 kernel-syms +2 4.4.121-92.92.1 SUSE-SU-2021:3929-1, SUSE-SU-2018:2344-2, SUSE-SU-2018:2344-1
SLES 12 SP2 kgraft-patch-SLE12-SP2_Update_24 1-3.7.1 SUSE-SU-2018:2344-2, SUSE-SU-2018:2344-1
SLES 12 SP2 lttng-modules 2.7.1-9.4.1 SUSE-SU-2018:2344-2, SUSE-SU-2018:2344-1
SLES 12 SP1 kernel-xen +3 3.12.74-60.64.99.1 SUSE-SU-2018:2384-1
SLES 12 SP1 kgraft-patch-SLE12-SP1_Update_30 1-2.3.1 SUSE-SU-2018:2384-1
SLES 12 SP1 lttng-modules 2.7.0-4.2.1 SUSE-SU-2018:2384-1
SLES 12 kernel-ec2 +4 3.12.61-52.141.1 SUSE-SU-2018:2384-1, SUSE-SU-2018:2362-1
SLES 12 kgraft-patch-SLE12_Update_37 1-1.5.1 SUSE-SU-2018:2362-1
SLES 12 lttng-modules 2.4.1-16.6.1 SUSE-SU-2018:2362-1
SLES for SAP 15 SP1 kernel-docs +3 4.12.14-197.102.2 SUSE-SU-2021:3876-1
SLES for SAP 15 SP1 kernel-obs-build 4.12.14-197.102.1 SUSE-SU-2021:3876-1
SLES for SAP 12 SP5 kernel-syms +2 4.12.14-122.98.1 SUSE-SU-2021:3748-1
SLES for SAP 12 SP4 kernel-syms +2 4.12.14-95.83.2 SUSE-SU-2021:3972-1
SLES for SAP 12 SP3 kernel-syms +2 4.4.140-94.42.1 SUSE-SU-2021:3935-1, SUSE-SU-2018:2051-1
SLES for SAP 12 SP3 kgraft-patch-SLE12-SP3_Update_41 1-4.3.1 SUSE-SU-2021:3935-1
SLES for SAP 12 SP2 kernel-syms +2 4.4.121-92.92.1 SUSE-SU-2018:2344-1
SLES for SAP 12 SP2 kgraft-patch-SLE12-SP2_Update_24 1-3.7.1 SUSE-SU-2018:2344-1
SLES for SAP 12 SP2 lttng-modules 2.7.1-9.4.1 SUSE-SU-2018:2344-1
SLES for SAP 12 SP1 kernel-xen +3 3.12.74-60.64.99.1 SUSE-SU-2018:2384-1
SLES for SAP 12 SP1 kgraft-patch-SLE12-SP1_Update_30 1-2.3.1 SUSE-SU-2018:2384-1
SLES for SAP 12 SP1 lttng-modules 2.7.0-4.2.1 SUSE-SU-2018:2384-1
SLE Real Time 12 SP5 kernel-rt +3 4.12.14-10.65.1 SUSE-SU-2021:3723-1
SLE Real Time 12 SP3 kernel-rt +3 4.4.139-3.17.1 SUSE-SU-2018:2150-1
SLE Live Patching 15 SP1 kernel-default 4.12.14-197.102.2 SUSE-SU-2021:3876-1
SLE Live Patching 15 SP1 kernel-livepatch-SLE15-SP1_Update_27 1-3.3.1 SUSE-SU-2021:3876-1
SLE Live Patching 15 kernel-default 4.12.14-25.3.1 SUSE-SU-2018:2092-1
SLE Live Patching 15 kernel-livepatch-SLE15_Update_1 1-1.3.1 SUSE-SU-2018:2092-1
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.98.1 SUSE-SU-2021:3748-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_25 1-8.7.1 SUSE-SU-2021:3748-1
SLE Live Patching 12 SP4 kernel-default 4.12.14-95.83.2 SUSE-SU-2021:3972-1
SLE Live Patching 12 SP4 kgraft-patch-SLE12-SP4_Update_23 1-6.3.1 SUSE-SU-2021:3972-1
SLE Live Patching 12 SP3 kgraft-patch-SLE12-SP3_Update_15 1-4.3.1 SUSE-SU-2018:2051-1
SLE HPC 15 SP1 kernel-docs +3 4.12.14-197.102.2 SUSE-SU-2021:3876-1
SLE HPC 15 SP1 kernel-obs-build 4.12.14-197.102.1 SUSE-SU-2021:3876-1
SUSE OpenStack Cloud Crowbar 9 kernel-syms +2 4.12.14-95.83.2 SUSE-SU-2021:3972-1
SUSE OpenStack Cloud Crowbar 8 kernel-syms +2 4.4.180-94.150.1 SUSE-SU-2021:3935-1
SUSE OpenStack Cloud Crowbar 8 kgraft-patch-SLE12-SP3_Update_41 1-4.3.1 SUSE-SU-2021:3935-1
SUSE OpenStack Cloud 9 kernel-syms +2 4.12.14-95.83.2 SUSE-SU-2021:3972-1
SUSE OpenStack Cloud 8 kernel-syms +2 4.4.180-94.150.1 SUSE-SU-2021:3935-1
SUSE OpenStack Cloud 8 kgraft-patch-SLE12-SP3_Update_41 1-4.3.1 SUSE-SU-2021:3935-1
SUSE OpenStack Cloud 7 kernel-syms +2 4.4.121-92.92.1 SUSE-SU-2018:2344-1
SUSE OpenStack Cloud 7 kgraft-patch-SLE12-SP2_Update_24 1-3.7.1 SUSE-SU-2018:2344-1
SUSE OpenStack Cloud 7 lttng-modules 2.7.1-9.4.1 SUSE-SU-2018:2344-1
SUSE HPE Helion OpenStack 8 kernel-syms +2 4.4.180-94.150.1 SUSE-SU-2021:3935-1
SUSE HPE Helion OpenStack 8 kgraft-patch-SLE12-SP3_Update_41 1-4.3.1 SUSE-SU-2021:3935-1
SUSE Enterprise Storage 6 kernel-docs +3 4.12.14-197.102.2 SUSE-SU-2021:3876-1
SUSE Enterprise Storage 6 kernel-obs-build 4.12.14-197.102.1 SUSE-SU-2021:3876-1
SUSE Enterprise Storage 4 kernel-syms +2 4.4.121-92.92.1 SUSE-SU-2018:2344-1
SUSE Enterprise Storage 4 kgraft-patch-SLE12-SP2_Update_24 1-3.7.1 SUSE-SU-2018:2344-1
SUSE Enterprise Storage 4 lttng-modules 2.7.1-9.4.1 SUSE-SU-2018:2344-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.3 kernel-debug +4 4.12.14-197.102.2 openSUSE-SU-2021:3876-1
openSUSE Leap 15.2 kernel-default-base 5.3.18-lp152.102.1.lp152.8.49.1 openSUSE-SU-2021:1477-1
openSUSE Leap 15.2 kernel-docs +8 5.3.18-lp152.102.1 openSUSE-SU-2021:1477-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 perf +7 4.14.59-68.43.amzn2 ALAS2-2018-1050

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 dtrace-modules-3.8.13-118.24.1.el6uek 0.4.5-3.el6 ELSA-2018-4211
Oracle Linux 7 dtrace-modules-3.8.13-118.24.1.el7uek 0.4.5-3.el7 ELSA-2018-4211
Oracle Linux 7 kernel-uek +5 3.8.13-118.24.1.el7uek ELSA-2018-4211
Oracle Linux 7 perf +12 3.10.0-957.el7 ELSA-2018-3083

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 42

References