Rapid7 Vulnerability & Exploit Database

SUSE: CVE-2024-36899: SUSE Linux Security Advisory

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

SUSE: CVE-2024-36899: SUSE Linux Security Advisory

Severity
4
CVSS
(AV:L/AC:M/Au:N/C:P/I:P/A:P)
Published
05/30/2024
Created
07/10/2024
Added
07/10/2024
Modified
07/11/2024

Description

In the Linux kernel, the following vulnerability has been resolved: gpiolib: cdev: Fix use after free in lineinfo_changed_notify The use-after-free issue occurs as follows: when the GPIO chip device file is being closed by invoking gpio_chrdev_release(), watched_lines is freed by bitmap_free(), but the unregistration of lineinfo_changed_nb notifier chain failed due to waiting write rwsem. Additionally, one of the GPIO chip's lines is also in the release process and holds the notifier chain's read rwsem. Consequently, a race condition leads to the use-after-free of watched_lines. Here is the typical stack when issue happened: [free] gpio_chrdev_release() --> bitmap_free(cdev->watched_lines) <-- freed --> blocking_notifier_chain_unregister() --> down_write(&nh->rwsem) <-- waiting rwsem --> __down_write_common() --> rwsem_down_write_slowpath() --> schedule_preempt_disabled() --> schedule() [use] st54spi_gpio_dev_release() --> gpio_free() --> gpiod_free() --> gpiod_free_commit() --> gpiod_line_state_notify() --> blocking_notifier_call_chain() --> down_read(&nh->rwsem); <-- held rwsem --> notifier_call_chain() --> lineinfo_changed_notify() --> test_bit(xxxx, cdev->watched_lines) <-- use after free The side effect of the use-after-free issue is that a GPIO line event is being generated for userspace where it shouldn't. However, since the chrdev is being closed, userspace won't have the chance to read that event anyway. To fix the issue, call the bitmap_free() function after the unregistration of lineinfo_changed_nb notifier chain.

Solution(s)

  • suse-upgrade-cluster-md-kmp-azure
  • suse-upgrade-cluster-md-kmp-rt
  • suse-upgrade-dlm-kmp-azure
  • suse-upgrade-dlm-kmp-rt
  • suse-upgrade-gfs2-kmp-azure
  • suse-upgrade-gfs2-kmp-rt
  • suse-upgrade-kernel-azure
  • suse-upgrade-kernel-azure-devel
  • suse-upgrade-kernel-azure-extra
  • suse-upgrade-kernel-azure-livepatch-devel
  • suse-upgrade-kernel-azure-optional
  • suse-upgrade-kernel-azure-vdso
  • suse-upgrade-kernel-devel-azure
  • suse-upgrade-kernel-devel-rt
  • suse-upgrade-kernel-rt
  • suse-upgrade-kernel-rt-devel
  • suse-upgrade-kernel-rt-extra
  • suse-upgrade-kernel-rt-livepatch
  • suse-upgrade-kernel-rt-livepatch-devel
  • suse-upgrade-kernel-rt-optional
  • suse-upgrade-kernel-rt-vdso
  • suse-upgrade-kernel-rt_debug
  • suse-upgrade-kernel-rt_debug-devel
  • suse-upgrade-kernel-rt_debug-livepatch-devel
  • suse-upgrade-kernel-rt_debug-vdso
  • suse-upgrade-kernel-source-azure
  • suse-upgrade-kernel-source-rt
  • suse-upgrade-kernel-syms-azure
  • suse-upgrade-kernel-syms-rt
  • suse-upgrade-kselftests-kmp-azure
  • suse-upgrade-kselftests-kmp-rt
  • suse-upgrade-ocfs2-kmp-azure
  • suse-upgrade-ocfs2-kmp-rt
  • suse-upgrade-reiserfs-kmp-azure
  • suse-upgrade-reiserfs-kmp-rt

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

;