7.8
CWE
190
Advisory Published
CVE Published
CVE Published
Updated

CVE-2018-14634: Integer Overflow

First published: Fri Aug 31 2018(Updated: )

A flaw was found in the Linux kernels with commit b6a2fea39318 ("mm: variable length argument support", from July 19, 2007) but without commit da029c11e6b1 ("exec:Limit arg stack to at most 75% of _STK_LIM", from July 7, 2017). An integer overflow in the Linux kernel's create_elf_tables() function. A local attacker can exploit this vulnerability via a SUID-root binary and obtain full root privileges. Referenced commits: b6a2fea39318 ("mm: variable length argument support", from July 19, 2007) <a href="https://github.com/torvalds/linux/commit/b6a2fea39318e43fee84fa7b0b90d68bed92d2ba">https://github.com/torvalds/linux/commit/b6a2fea39318e43fee84fa7b0b90d68bed92d2ba</a> da029c11e6b1 ("exec: Limit arg stack to at most 75% of _STK_LIM", from July 7, 2017) <a href="https://github.com/torvalds/linux/commit/da029c11e6b12f321f36dac8771e833b65cec962">https://github.com/torvalds/linux/commit/da029c11e6b12f321f36dac8771e833b65cec962</a> Additional references: <a href="https://www.qualys.com/2018/09/25/cve-2018-14634/mutagen-astronomy-integer-overflow-linux-create_elf_tables-cve-2018-14634.txt">https://www.qualys.com/2018/09/25/cve-2018-14634/mutagen-astronomy-integer-overflow-linux-create_elf_tables-cve-2018-14634.txt</a>

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
redhat/kernel<0:2.6.32-754.6.3.el6
0:2.6.32-754.6.3.el6
redhat/kernel<0:2.6.32-358.94.1.el6
0:2.6.32-358.94.1.el6
redhat/kernel<0:2.6.32-431.93.2.el6
0:2.6.32-431.93.2.el6
redhat/kernel<0:2.6.32-504.76.2.el6
0:2.6.32-504.76.2.el6
redhat/kernel<0:2.6.32-573.65.2.el6
0:2.6.32-573.65.2.el6
redhat/kernel-rt<0:3.10.0-862.14.4.rt56.821.el7
0:3.10.0-862.14.4.rt56.821.el7
redhat/kernel<0:3.10.0-862.14.4.el7
0:3.10.0-862.14.4.el7
redhat/kernel<0:3.10.0-327.76.1.el7
0:3.10.0-327.76.1.el7
redhat/kernel<0:3.10.0-514.61.1.el7
0:3.10.0-514.61.1.el7
redhat/kernel<0:3.10.0-693.43.1.el7
0:3.10.0-693.43.1.el7
redhat/kernel-rt<1:3.10.0-693.43.1.rt56.630.el6
1:3.10.0-693.43.1.rt56.630.el6
Linux Linux kernel>=2.6.0<=2.6.39.4
Linux Linux kernel>=3.10.0<=3.10.102
Linux Linux kernel>=4.14.0<=4.14.54
Redhat Enterprise Linux Desktop=6.0
Redhat Enterprise Linux Desktop=7.0
Redhat Enterprise Linux Server=6.0
Redhat Enterprise Linux Server=7.0
Redhat Enterprise Linux Server Aus=6.5
Redhat Enterprise Linux Server Aus=6.6
Redhat Enterprise Linux Server Aus=7.6
Redhat Enterprise Linux Server Eus=6.7
Redhat Enterprise Linux Server Eus=7.5
Redhat Enterprise Linux Server Eus=7.6
Redhat Enterprise Linux Server Tus=6.6
Redhat Enterprise Linux Server Tus=7.6
Redhat Enterprise Linux Workstation=6.0
Redhat Enterprise Linux Workstation=7.0
Canonical Ubuntu Linux=12.04
Canonical Ubuntu Linux=14.04
Netapp Active Iq Performance Analytics Services
debian/linux
5.10.223-1
5.10.226-1
6.1.115-1
6.1.119-1
6.11.10-1
6.12.5-1

Remedy

To mitigate the issue: Enable and install kernel-debuginfo packages as per https://access.redhat.com/solutions/666123 1) On the host, save the following in a file with the ".stp" extension: // CVE-2018-14634 // // Theory of operations: adjust the thread's # rlimit-in-effect around // calls to the vulnerable get_arg_page() function so as to encompass // the newly required _STK_LIM / 4 * 3 maximum. // Complication: the rlimit is stored in a current-> structure that // is shared across the threads of the process. They may concurrently // invoke this operation. function clamp_stack_rlim_cur:long () %{ struct rlimit *rlim = current->signal->rlim; unsigned long rlim_cur = READ_ONCE(rlim[RLIMIT_STACK].rlim_cur); unsigned long limit = _STK_LIM / 4 * 3; limit *= 4; // multiply it back up, to the scale used by rlim_cur if (rlim_cur > limit) { WRITE_ONCE(rlim[RLIMIT_STACK].rlim_cur, limit); STAP_RETURN(limit); } else STAP_RETURN(0); %} probe kernel.function("copy_strings").call { l = clamp_stack_rlim_cur() if (l) printf("lowered process %s(%d) STACK rlim_cur to %p\n", execname(), pid(), l) } probe begin { printf("CVE-2018-14634 mitigation loaded\n") } probe end { printf("CVE-2018-14634 mitigation unloaded\n") } 2) Install the "systemtap" package and any required dependencies. Refer to the "2. Using SystemTap" chapter in the Red Hat Enterprise Linux "SystemTap Beginners Guide" document, available from docs.redhat.com, for information on installing the required -debuginfo and matching kernel-devel packages 3) Run the "stap -g [filename-from-step-1].stp" command as root. If the host is rebooted, the changes will be lost and the script must be run again. Alternatively, build the systemtap script on a development system with "stap -g -p 4 [filename-from-step-1].stp", distribute the resulting kernel module to all affected systems, and run "staprun -L <module>" on those. When using this approach only systemtap-runtime package is required on the affected systems. Please notice that the kernel version must be the same across all systems. This may not be a suitable workaround if your application uses massive amounts of stack space. Please consider this if there are any adverse affects when running this mitigation.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203