Rapid7 Vulnerability & Exploit Database

Ubuntu: (Multiple Advisories) (CVE-2024-38613): Linux kernel vulnerabilities

Free InsightVM Trial No Credit Card Necessary
2024 Attack Intel Report Latest research by Rapid7 Labs
Back to Search

Ubuntu: (Multiple Advisories) (CVE-2024-38613): Linux kernel vulnerabilities

Severity
4
CVSS
(AV:L/AC:M/Au:N/C:P/I:P/A:P)
Published
06/19/2024
Created
08/10/2024
Added
08/09/2024
Modified
08/15/2024

Description

In the Linux kernel, the following vulnerability has been resolved: m68k: Fix spinlock race in kernel thread creation Context switching does take care to retain the correct lock owner across the switch from 'prev' to 'next' tasks. This does rely on interrupts remaining disabled for the entire duration of the switch. This condition is guaranteed for normal process creation and context switching between already running processes, because both 'prev' and 'next' already have interrupts disabled in their saved copies of the status register. The situation is different for newly created kernel threads. The status register is set to PS_S in copy_thread(), which does leave the IPL at 0. Upon restoring the 'next' thread's status register in switch_to() aka resume(), interrupts then become enabled prematurely. resume() then returns via ret_from_kernel_thread() and schedule_tail() where run queue lock is released (see finish_task_switch() and finish_lock_switch()). A timer interrupt calling scheduler_tick() before the lock is released in finish_task_switch() will find the lock already taken, with the current task as lock owner. This causes a spinlock recursion warning as reported by Guenter Roeck. As far as I can ascertain, this race has been opened in commit 533e6903bea0 ("m68k: split ret_from_fork(), simplify kernel_thread()") but I haven't done a detailed study of kernel history so it may well predate that commit. Interrupts cannot be disabled in the saved status register copy for kernel threads (init will complain about interrupts disabled when finally starting user space). Disable interrupts temporarily when switching the tasks' register sets in resume(). Note that a simple oriw 0x700,%sr after restoring sr is not enough here - this leaves enough of a race for the 'spinlock recursion' warning to still be observed. Tested on ARAnyM and qemu (Quadra 800 emulation).

Solution(s)

  • ubuntu-upgrade-linux-image-5-4-0-1042-iot
  • ubuntu-upgrade-linux-image-5-4-0-1049-xilinx-zynqmp
  • ubuntu-upgrade-linux-image-5-4-0-1077-ibm
  • ubuntu-upgrade-linux-image-5-4-0-1097-gkeop
  • ubuntu-upgrade-linux-image-5-4-0-1114-raspi
  • ubuntu-upgrade-linux-image-5-4-0-1118-kvm
  • ubuntu-upgrade-linux-image-5-4-0-1129-oracle
  • ubuntu-upgrade-linux-image-5-4-0-1130-aws
  • ubuntu-upgrade-linux-image-5-4-0-1134-gcp
  • ubuntu-upgrade-linux-image-5-4-0-1135-azure
  • ubuntu-upgrade-linux-image-5-4-0-192-generic
  • ubuntu-upgrade-linux-image-5-4-0-192-generic-lpae
  • ubuntu-upgrade-linux-image-5-4-0-192-lowlatency
  • ubuntu-upgrade-linux-image-6-8-0-1008-gke
  • ubuntu-upgrade-linux-image-6-8-0-1009-raspi
  • ubuntu-upgrade-linux-image-6-8-0-1010-ibm
  • ubuntu-upgrade-linux-image-6-8-0-1010-oem
  • ubuntu-upgrade-linux-image-6-8-0-1010-oracle
  • ubuntu-upgrade-linux-image-6-8-0-1010-oracle-64k
  • ubuntu-upgrade-linux-image-6-8-0-1011-nvidia
  • ubuntu-upgrade-linux-image-6-8-0-1011-nvidia-64k
  • ubuntu-upgrade-linux-image-6-8-0-1011-nvidia-lowlatency
  • ubuntu-upgrade-linux-image-6-8-0-1011-nvidia-lowlatency-64k
  • ubuntu-upgrade-linux-image-6-8-0-1012-gcp
  • ubuntu-upgrade-linux-image-6-8-0-1013-aws
  • ubuntu-upgrade-linux-image-6-8-0-40-generic
  • ubuntu-upgrade-linux-image-6-8-0-40-generic-64k
  • ubuntu-upgrade-linux-image-6-8-0-40-lowlatency
  • ubuntu-upgrade-linux-image-6-8-0-40-lowlatency-64k
  • ubuntu-upgrade-linux-image-aws
  • ubuntu-upgrade-linux-image-aws-lts-20-04
  • ubuntu-upgrade-linux-image-azure-lts-20-04
  • ubuntu-upgrade-linux-image-gcp
  • ubuntu-upgrade-linux-image-gcp-lts-20-04
  • ubuntu-upgrade-linux-image-generic
  • ubuntu-upgrade-linux-image-generic-64k
  • ubuntu-upgrade-linux-image-generic-64k-hwe-24-04
  • ubuntu-upgrade-linux-image-generic-hwe-18-04
  • ubuntu-upgrade-linux-image-generic-hwe-24-04
  • ubuntu-upgrade-linux-image-generic-lpae
  • ubuntu-upgrade-linux-image-gke
  • ubuntu-upgrade-linux-image-gkeop
  • ubuntu-upgrade-linux-image-gkeop-5-4
  • ubuntu-upgrade-linux-image-ibm
  • ubuntu-upgrade-linux-image-ibm-classic
  • ubuntu-upgrade-linux-image-ibm-lts-20-04
  • ubuntu-upgrade-linux-image-ibm-lts-24-04
  • ubuntu-upgrade-linux-image-kvm
  • ubuntu-upgrade-linux-image-lowlatency
  • ubuntu-upgrade-linux-image-lowlatency-64k
  • ubuntu-upgrade-linux-image-lowlatency-hwe-18-04
  • ubuntu-upgrade-linux-image-nvidia
  • ubuntu-upgrade-linux-image-nvidia-6-8
  • ubuntu-upgrade-linux-image-nvidia-64k
  • ubuntu-upgrade-linux-image-nvidia-64k-6-8
  • ubuntu-upgrade-linux-image-nvidia-lowlatency
  • ubuntu-upgrade-linux-image-nvidia-lowlatency-64k
  • ubuntu-upgrade-linux-image-oem
  • ubuntu-upgrade-linux-image-oem-24-04
  • ubuntu-upgrade-linux-image-oem-24-04a
  • ubuntu-upgrade-linux-image-oem-osp1
  • ubuntu-upgrade-linux-image-oracle
  • ubuntu-upgrade-linux-image-oracle-64k
  • ubuntu-upgrade-linux-image-oracle-lts-20-04
  • ubuntu-upgrade-linux-image-raspi
  • ubuntu-upgrade-linux-image-raspi2
  • ubuntu-upgrade-linux-image-snapdragon-hwe-18-04
  • ubuntu-upgrade-linux-image-virtual
  • ubuntu-upgrade-linux-image-virtual-hwe-18-04
  • ubuntu-upgrade-linux-image-virtual-hwe-24-04
  • ubuntu-upgrade-linux-image-xilinx-zynqmp

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center

;