# CVE-2022-49767: 9p/trans\_fd: always use O\_NONBLOCK read/write

> 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.29% (percentile 14, 2026-11-26)
- **Published:** 2025-05-01T14:09:06.183Z
- **Modified:** 2026-06-17T05:19:05.850Z

## Who should check

- Anyone running Linux \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0b5e6bd72b8171364616841603a70e4ba9837063; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 9f8554615df668e4bf83294633ee9d232b28ce45; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 7abf40f06a76c0dff42eada10597917e9776fbd4; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< b1ad04da7fe4515e2ce2d5f2dcab3b5b6d45614b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< a8e2fc8f7b41fa9d9ca5f624f4e4d34fce5b40a9; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0e07032b4b4724b8ad1003698cb81083c1818999; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 5af16182c5639349415118e9e9aecd8355f7a08b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< ef575281b21e9a34dfae544a187c6aac2ae424a9
- Anyone running Linux 2.6.17

## Description

In the Linux kernel, the following vulnerability has been resolved:

9p/trans\_fd: always use O\_NONBLOCK read/write

syzbot is reporting hung task at p9\_fd\_close() \[1\], for p9\_mux\_poll\_stop()
 from p9\_conn\_destroy() from p9\_fd\_close() is failing to interrupt already
started kernel\_read() from p9\_fd\_read() from p9\_read\_work() and/or
kernel\_write() from p9\_fd\_write() from p9\_write\_work() requests.

Since p9\_socket\_open() sets O\_NONBLOCK flag, p9\_mux\_poll\_stop() does not
need to interrupt kernel\_read()/kernel\_write(). However, since p9\_fd\_open()
does not set O\_NONBLOCK flag, but pipe blocks unless signal is pending,
p9\_mux\_poll\_stop() needs to interrupt kernel\_read()/kernel\_write() when
the file descriptor refers to a pipe. In other words, pipe file descriptor
needs to be handled as if socket file descriptor.

We somehow need to interrupt kernel\_read()/kernel\_write() on pipes.

A minimal change, which this patch is doing, is to set O\_NONBLOCK flag
 from p9\_fd\_open(), for O\_NONBLOCK flag does not affect reading/writing
of regular files. But this approach changes O\_NONBLOCK flag on userspace-
supplied file descriptors (which might break userspace programs), and
O\_NONBLOCK flag could be changed by userspace. It would be possible to set
O\_NONBLOCK flag every time p9\_fd\_read()/p9\_fd\_write() is invoked, but still
remains small race window for clearing O\_NONBLOCK flag.

If we don't want to manipulate O\_NONBLOCK flag, we might be able to
surround kernel\_read()/kernel\_write() with set\_thread\_flag(TIF\_SIGPENDING)
and recalc\_sigpending(). Since p9\_read\_work()/p9\_write\_work() works are
processed by kernel threads which process global system\_wq workqueue,
signals could not be delivered from remote threads when p9\_mux\_poll\_stop()
 from p9\_conn\_destroy() from p9\_fd\_close() is called. Therefore, calling
set\_thread\_flag(TIF\_SIGPENDING)/recalc\_sigpending() every time would be
needed if we count on signals for making kernel\_read()/kernel\_write()
non-blocking.

\[Dominique: add comment at Christian's suggestion\]

## Affected and fixed versions

- Linux: \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0b5e6bd72b8171364616841603a70e4ba9837063; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 9f8554615df668e4bf83294633ee9d232b28ce45; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 7abf40f06a76c0dff42eada10597917e9776fbd4; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< b1ad04da7fe4515e2ce2d5f2dcab3b5b6d45614b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< a8e2fc8f7b41fa9d9ca5f624f4e4d34fce5b40a9; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0e07032b4b4724b8ad1003698cb81083c1818999; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 5af16182c5639349415118e9e9aecd8355f7a08b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< ef575281b21e9a34dfae544a187c6aac2ae424a9 (cvelist)
- Linux: 2.6.17 (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-2022-49767. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49767.md
Affected: Linux >= 27979bb2ff748613dba96ae66392a76fb0678527, < 0b5e6bd72b8171364616841603a70e4ba9837063; >= 27979bb2ff748613dba96ae66392a76fb0678527, < 9f8554615df668e4bf83294633ee9d232b28ce45; >= 27979bb2ff748613dba96ae66392a76fb0678527, < 7abf40f06a76c0dff42eada10597917e9776fbd4; >= 27979bb2ff748613dba96ae…
Fixed in: Linux 0b5e6bd72b8171364616841603a70e4ba9837063, Linux 9f8554615df668e4bf83294633ee9d232b28ce45, Linux 7abf40f06a76c0dff42eada10597917e9776fbd4, Linux 0e07032b4b4724b8ad1003698cb81083c1818999, Linux 5af16182c5639349415118e9e9aecd8355f7a08b

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-2022-49767 being exploited?

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

### How serious is CVE-2022-49767?

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

### Which versions are affected by CVE-2022-49767?

Linux \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0b5e6bd72b8171364616841603a70e4ba9837063; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 9f8554615df668e4bf83294633ee9d232b28ce45; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 7abf40f06a76c0dff42eada10597917e9776fbd4; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< b1ad04da7fe4515e2ce2d5f2dcab3b5b6d45614b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< a8e2fc8f7b41fa9d9ca5f624f4e4d34fce5b40a9; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 0e07032b4b4724b8ad1003698cb81083c1818999; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< 5af16182c5639349415118e9e9aecd8355f7a08b; \>= 27979bb2ff748613dba96ae66392a76fb0678527, \< ef575281b21e9a34dfae544a187c6aac2ae424a9; Linux 2.6.17.

### Is there a fix for CVE-2022-49767?

Yes. Fixed in Linux 0b5e6bd72b8171364616841603a70e4ba9837063, Linux 9f8554615df668e4bf83294633ee9d232b28ce45, Linux 7abf40f06a76c0dff42eada10597917e9776fbd4, Linux 0e07032b4b4724b8ad1003698cb81083c1818999, Linux 5af16182c5639349415118e9e9aecd8355f7a08b. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49767?

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/0b5e6bd72b8171364616841603a70e4ba9837063>
- patch: <https://git.kernel.org/stable/c/9f8554615df668e4bf83294633ee9d232b28ce45>
- patch: <https://git.kernel.org/stable/c/7abf40f06a76c0dff42eada10597917e9776fbd4>
- patch: <https://git.kernel.org/stable/c/b1ad04da7fe4515e2ce2d5f2dcab3b5b6d45614b>
- patch: <https://git.kernel.org/stable/c/a8e2fc8f7b41fa9d9ca5f624f4e4d34fce5b40a9>
- patch: <https://git.kernel.org/stable/c/0e07032b4b4724b8ad1003698cb81083c1818999>
- patch: <https://git.kernel.org/stable/c/5af16182c5639349415118e9e9aecd8355f7a08b>
- patch: <https://git.kernel.org/stable/c/ef575281b21e9a34dfae544a187c6aac2ae424a9>

## 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-2022-49767>

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