nvme-tcp: fix usage of page_frag_cache
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
c57506918b078ecab7dedebef0f34dbc23ae2e46| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: fix usage of page_frag_cache
nvme uses page_frag_cache to preallocate PDU for each preallocated request of block device. Block devices are created in parallel threads, consequently page_frag_cache is used in not thread-safe manner. That leads to incorrect refcounting of backstore pages and premature free.
That can be catched by !sendpage_ok inside network stack:
WARNING: CPU: 7 PID: 467 at ../net/core/skbuff.c:6931 skb_splice_from_iter+0xfa/0x310. tcp_sendmsg_locked+0x782/0xce0 tcp_sendmsg+0x27/0x40 sock_sendmsg+0x8b/0xa0 nvme_tcp_try_send_cmd_pdu+0x149/0x2a0 Then random panic may occur.
Fix that by serializing the usage of page_frag_cache.
From the CVE record · Linux
The Linux kernel's nvme-tcp code uses page_frag_cache without thread-safe serialization while block devices are created in parallel. This can cause incorrect page reference counts, premature page freeing, and a kernel panic. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with nvme-tcp should check their versions; affected versions are not specified.