9p/net: fix improper handling of bogus negative read/write replies
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
9p/net: fix improper handling of bogus negative read/write replies
In p9_client_write() and p9_client_read_once(), if the server incorrectly replies with success but a negative write/read count then we would consider written (negative) <= rsize (positive) because both variables were signed.
Make variables unsigned to avoid this problem.
The reproducer linked below now fails with the following error instead of a null pointer deref: 9pnet: bogus RWRITE count (4294967295 > 3)
From the CVE record · Linux
The Linux kernel’s 9p network code improperly handles a server reply that reports success with a negative read or write count. Such a reply can cause a null pointer dereference; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels that use 9p should check whether their kernel includes the fix; affected versions were not provided.