7.1
CWE
125
Advisory Published
CVE Published
Updated

CVE-2017-18344

First published: Fri Dec 15 2017(Updated: )

A flaw was found in kernel versions before 4.14.8. The timer_create syscall implementation in kernel/time/posix-timers.c in the Linux kernel before 4.14.8 doesn't properly validate the sigevent-&gt;sigev_notify field, which leads to out-of-bounds access in the show_timer function (called when /proc/$PID/timers is read). This allows userspace applications to read arbitrary kernel memory (on a kernel built with CONFIG_POSIX_TIMERS and CONFIG_CHECKPOINT_RESTORE). References: <a href="http://seclists.org/oss-sec/2018/q3/76">http://seclists.org/oss-sec/2018/q3/76</a> An upstream patch: <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cef31d9af908243421258f1df35a4a644604efbe">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cef31d9af908243421258f1df35a4a644604efbe</a>

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
redhat/kernel-rt<0:3.10.0-957.rt56.910.el7
0:3.10.0-957.rt56.910.el7
redhat/kernel-alt<0:4.14.0-115.el7a
0:4.14.0-115.el7a
redhat/kernel<0:3.10.0-957.el7
0:3.10.0-957.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<0:3.10.0-862.20.2.el7
0:3.10.0-862.20.2.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<4.14.8
Canonical Ubuntu Linux=12.04
Canonical Ubuntu Linux=14.04
Redhat Mrg Realtime=2.0
Redhat Enterprise Linux Desktop=7.0
Redhat Enterprise Linux Server=7.0
Redhat Enterprise Linux Server Aus=7.2
Redhat Enterprise Linux Server Aus=7.3
Redhat Enterprise Linux Server Aus=7.4
Redhat Enterprise Linux Server Eus=7.3
Redhat Enterprise Linux Server Eus=7.5
Redhat Enterprise Linux Server Tus=7.2
Redhat Enterprise Linux Server Tus=7.3
Redhat Enterprise Linux Server Tus=7.4
Redhat Enterprise Linux Workstation=7.0
redhat/kernel<4.14.8
4.14.8
debian/linux
5.10.223-1
5.10.226-1
6.1.106-3
6.1.112-1
6.11.4-1
6.11.5-1

Remedy

Attached to this bugzilla is a systemtap script that will prevent opening (and therefore reading) the /proc/<process>/timers file which is used to leak information. The SystemTap script is relatively small and efficient, broken into 3 distinct sections as follows: -------- probe kernel.function("proc_timers_open@fs/proc/base.c").return { // this is -EACCES $return = -13; message = sprintf("CVE-2017-18344 mitigation denied access to %s to %s(%d)", file_name , execname(), pid()); // print a warning message at KERN_INFO debug level printk(6, message); } probe begin { printk(6, "Mitigation for CVE-2017-18344 loaded.\n"); } probe end { printk(6, "Mitigation for CVE-2017-18344 unloaded.\n"); } --------- First, the script places a probe at the return of the kernel function “proc_timers_open” when called. This modifies the return value to be EACCES which would return this value to userspace preventing this file from being opened. When the /proc/<pid>/timer file is attempted to be opened, a message will be logged to the kernel log subsystem showing the process and pid of the application attempting to access the timer file. This file is not in widespread use at this time, although some applications may read from it to debug or understand their own timers that are set. This mitigation will not be useful in this context. Finally, the “probe begin” and “probe end” code blocks tell systemtap to add the supplied text to the kernel log buffer via the printk function. This creates an audit trail by registering in the system logs exactly when the mitigation is loaded and unloaded. This will need to be compiled with guru mode (-g parameter) to compile. This will need to be loaded at each boot to remain effective. Red Hat Product security recommends updating to a patched kernel when it is available. Red Hat always seeks to provide both mitigations to disable attacks as well as the actual patches to treat the flaw. To learn more about SystemTap, and how it can be used in your management of your Red Hat systems, please refer to Using SystemTap[1] or one of our videos about it within our Customer Portal[2]. 1 - https://access.redhat.com/articles/17839 2 - https://access.redhat.com/search/#/?q=systemtap

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

Frequently Asked Questions

  • What is CVE-2017-18344?

    CVE-2017-18344 is a vulnerability that affects the timer_create syscall implementation in the Linux kernel.

  • What is the severity of CVE-2017-18344?

    CVE-2017-18344 has a severity level of high (7).

  • How does CVE-2017-18344 affect Linux?

    CVE-2017-18344 leads to an out-of-bounds access in the show_timer function of the Linux kernel.

  • Which versions of Linux are affected by CVE-2017-18344?

    Linux kernel versions before 4.14.8 are affected by CVE-2017-18344.

  • How can I fix CVE-2017-18344?

    To fix CVE-2017-18344, update your Linux kernel to version 4.14.8 or later.

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