Junglewise Threat Intelligence

CVE-2024-38780: Linux Kernel improper locking in dma-buf/sw-sync

CVE-2024-38780 · Severity: medium · CVSS 5.5 · Published 2024-06-21

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's synchronization mechanism used for managing shared memory buffers. An error in how the system handles internal locking could lead to inconsistent system states or crashes. This primarily affects system stability and could be used by a local attacker to cause a denial-of-service condition.

Technical details

The vulnerability is a CWE-667 (Improper Locking) issue within the dma-buf/sw-sync driver. A previous commit incorrectly replaced spin_unlock_irqrestore() with spin_unlock_irq() in both sync_debugfs_show() and sync_print_obj(). Because sync_print_obj() is called from sync_debugfs_show(), which already manages interrupt states, this results in an inconsistent lock state and triggers lockdep warnings. A local attacker with access to debugfs could potentially exploit this to cause a kernel panic or system instability. The issue has been resolved by using plain spin_lock/unlock in the nested sync_print_obj() function.

Affected products

  • Linux Linux Kernel up to (excluding) 4.14, 4.19 to (excluding) 4.19.316, 5.4 to (excluding) 5.4.278, 5.10 to (excluding) 5.10.219, 5.15 to (excluding) 5.15.161, 6.1 to (excluding) 6.1.93, 6.6 to (excluding) 6.6.33, 6.9 to (excluding) 6.9.4

Timeline

  • 2024-06-21: disclosed
  • 2024-06-21: advisory

References

Related threats