CVE-2023-52791·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: i2c: core: Run atomic i2c xfer when !preemptible Since bae1d3a05a8b, i2c transfers are non-atomic if preemption is disabled. However, non-atomic i2c transfers require preemption (e.g. in wait_for_completion() while waiting for the DMA). panic() calls preempt_disable_notrace() before calling emergency_restart(). Therefore, if an i2c device is used for the restart, the xfer should be atomic. This avoids warnings like: [ 12.667612] WARNING: CPU: 1 PID: 1 at kernel/rcu/tree_plugin.h:318 rcu_note_context_switch+0x33c/0x6b0 [ 12.676926] Voluntary context switch within RCU read-side critical section! ... [ 12.742376] schedule_timeout from wait_for_completion_timeout+0x90/0x114 [ 12.749179] wait_for_completion_timeout from tegra_i2c_wait_completion+0x40/0x70 ... [ 12.994527] atomic_notifier_call_chain from machine_restart+0x34/0x58 [ 13.001050] machine_restart from panic+0x2a8/0x32c Use !preemptible() instead, which is basically the same check as pre-v5.2.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.6.3
- Published
- 2024-05-21
Affected versions
From: 6.6
Until: 6.6.3
Fixed in: 6.6.3
How to fix this CVE
Update your Linux kernel to version 6.6.3 or later to resolve this i2c subsystem vulnerability. The fix corrects improper preemption handling during i2c transfers that occur in critical kernel contexts like panic recovery, preventing context switch warnings and potential system instability. Systems running kernel versions 6.6.0 through 6.6.2 should prioritize this update.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version with: uname -r
- Verify if you are running kernel 6.6.0 through 6.6.2: grep -E '^6\.6\.[0-2]$' /proc/version
- Search system logs for i2c-related RCU warnings: dmesg | grep -A5 'rcu_note_context_switch'
- Confirm the fix was applied by verifying kernel version is 6.6.3 or later: uname -r | grep -E '6\.[7-9]|[7-9]\.'
- Check kernel module for preemption handling: modinfo i2c_core | grep version
FAQ
What is CVE-2023-52791?
CVE-2023-52791 is a kernel vulnerability in the i2c subsystem where i2c transfers incorrectly use non-atomic (preemptible) code paths during critical kernel operations like system panic, leading to RCU context switch warnings and potential system instability.
Is CVE-2023-52791 being actively exploited?
No, CVE-2023-52791 is not listed in CISA's Known Exploited Vulnerabilities catalog and has no public exploit code available. However, it can cause system failures during panic/restart scenarios on affected kernels.
What versions of Kernel are affected by CVE-2023-52791?
Linux kernel versions 6.6.0, 6.6.1, and 6.6.2 are affected. Kernel 6.6.3 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2023-52791?
Run 'uname -r' and check if the output matches 6.6.[0-2]. If it does, your system is vulnerable and requires a kernel update.
Does Defensia detect CVE-2023-52791?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2023-52791 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/185f3617adc8fe45e40489b458f03911f0dec46c
- https://git.kernel.org/stable/c/25284c46b657f48c0f3880a2e0706c70d81182c0
- https://git.kernel.org/stable/c/25eb381a736e7ae39a4245ef5c96484eb1073809
- https://git.kernel.org/stable/c/3473cf43b9068b9dfef2f545f833f33c6a544b91
- https://git.kernel.org/stable/c/8c3fa52a46ff4d208cefb1a462ec94e0043a91e1
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52791. Free for 1 server.
Get started free