# CVE-2023-52791: i2c: core: Run atomic i2c xfer when !preemptible

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **Published:** 2024-05-21T15:31:06.997Z
- **Modified:** 2026-06-17T06:43:35.427Z

## Who should check

- Anyone running Linux \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25eb381a736e7ae39a4245ef5c96484eb1073809; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25284c46b657f48c0f3880a2e0706c70d81182c0; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< f6237afabc349c1c7909db00e15d2816519e0d2b; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 185f3617adc8fe45e40489b458f03911f0dec46c; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 8c3fa52a46ff4d208cefb1a462ec94e0043a91e1; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 3473cf43b9068b9dfef2f545f833f33c6a544b91; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< aa49c90894d06e18a1ee7c095edbd2f37c232d02
- Anyone running Linux 5.2

## Description

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.

## Affected and fixed versions

- Linux: \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25eb381a736e7ae39a4245ef5c96484eb1073809; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25284c46b657f48c0f3880a2e0706c70d81182c0; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< f6237afabc349c1c7909db00e15d2816519e0d2b; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 185f3617adc8fe45e40489b458f03911f0dec46c; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 8c3fa52a46ff4d208cefb1a462ec94e0043a91e1; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 3473cf43b9068b9dfef2f545f833f33c6a544b91; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< aa49c90894d06e18a1ee7c095edbd2f37c232d02 (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52791. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52791.md
Affected: Linux >= bae1d3a05a8b99bd748168bbf8155a1d047c562e, < 25eb381a736e7ae39a4245ef5c96484eb1073809; >= bae1d3a05a8b99bd748168bbf8155a1d047c562e, < 25284c46b657f48c0f3880a2e0706c70d81182c0; >= bae1d3a05a8b99bd748168bbf8155a1d047c562e, < f6237afabc349c1c7909db00e15d2816519e0d2b; >= bae1d3a05a8b99bd748168b…
Fixed in: Linux 25eb381a736e7ae39a4245ef5c96484eb1073809, Linux 25284c46b657f48c0f3880a2e0706c70d81182c0, Linux 185f3617adc8fe45e40489b458f03911f0dec46c, Linux 8c3fa52a46ff4d208cefb1a462ec94e0043a91e1, Linux 3473cf43b9068b9dfef2f545f833f33c6a544b91

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52791 being exploited?

There is no confirmed exploitation: CVE-2023-52791 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52791?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52791?

Linux \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25eb381a736e7ae39a4245ef5c96484eb1073809; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 25284c46b657f48c0f3880a2e0706c70d81182c0; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< f6237afabc349c1c7909db00e15d2816519e0d2b; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 185f3617adc8fe45e40489b458f03911f0dec46c; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 8c3fa52a46ff4d208cefb1a462ec94e0043a91e1; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< 3473cf43b9068b9dfef2f545f833f33c6a544b91; \>= bae1d3a05a8b99bd748168bbf8155a1d047c562e, \< aa49c90894d06e18a1ee7c095edbd2f37c232d02; Linux 5.2.

### Is there a fix for CVE-2023-52791?

Yes. Fixed in Linux 25eb381a736e7ae39a4245ef5c96484eb1073809, Linux 25284c46b657f48c0f3880a2e0706c70d81182c0, Linux 185f3617adc8fe45e40489b458f03911f0dec46c, Linux 8c3fa52a46ff4d208cefb1a462ec94e0043a91e1, Linux 3473cf43b9068b9dfef2f545f833f33c6a544b91. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52791?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/25eb381a736e7ae39a4245ef5c96484eb1073809>
- patch: <https://git.kernel.org/stable/c/25284c46b657f48c0f3880a2e0706c70d81182c0>
- patch: <https://git.kernel.org/stable/c/f6237afabc349c1c7909db00e15d2816519e0d2b>
- patch: <https://git.kernel.org/stable/c/185f3617adc8fe45e40489b458f03911f0dec46c>
- patch: <https://git.kernel.org/stable/c/8c3fa52a46ff4d208cefb1a462ec94e0043a91e1>
- patch: <https://git.kernel.org/stable/c/3473cf43b9068b9dfef2f545f833f33c6a544b91>
- patch: <https://git.kernel.org/stable/c/aa49c90894d06e18a1ee7c095edbd2f37c232d02>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52791>

HTML: <https://flawdb.com/CVE-2023-52791> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52791>
