CVE-2023-52791

Source
https://cve.org/CVERecord?id=CVE-2023-52791
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52791.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-52791
Downstream
Related
Published
2024-05-21T15:31:06.997Z
Modified
2026-03-14T12:16:52.218100Z
Summary
i2c: core: Run atomic i2c xfer when !preemptible
Details

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 waitforcompletion() while waiting for the DMA).

panic() calls preemptdisablenotrace() 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/treeplugin.h:318 rcunotecontextswitch+0x33c/0x6b0 [ 12.676926] Voluntary context switch within RCU read-side critical section! ... [ 12.742376] scheduletimeout from waitforcompletiontimeout+0x90/0x114 [ 12.749179] waitforcompletiontimeout from tegrai2cwaitcompletion+0x40/0x70 ... [ 12.994527] atomicnotifiercallchain from machinerestart+0x34/0x58 [ 13.001050] machine_restart from panic+0x2a8/0x32c

Use !preemptible() instead, which is basically the same check as pre-v5.2.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52791.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
bae1d3a05a8b99bd748168bbf8155a1d047c562e
Fixed
25eb381a736e7ae39a4245ef5c96484eb1073809
Fixed
25284c46b657f48c0f3880a2e0706c70d81182c0
Fixed
f6237afabc349c1c7909db00e15d2816519e0d2b
Fixed
185f3617adc8fe45e40489b458f03911f0dec46c
Fixed
8c3fa52a46ff4d208cefb1a462ec94e0043a91e1
Fixed
3473cf43b9068b9dfef2f545f833f33c6a544b91
Fixed
aa49c90894d06e18a1ee7c095edbd2f37c232d02

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52791.json"