Linux
net: skmsg: preserve sg.copy across SG transforms
In the Linux kernel, the following vulnerability has been resolved: net: skmsg: preserve sg.copy across SG transforms The sk_msg sg.copy bitmap is part of the scatterlist entry ownership state. A set bit tells sk_msg_compute_data_pointers() not to expose the entry through writable BPF ctx->data. This protects entries backed by pages that are not private to the sk_msg, such as splice-backed file page-cache pages. Several sk_msg transform paths move, copy, split, or compact msg->sg.data[] entries without moving the matching sg.copy bit. This can make an externally backed entry arrive at a new slot with a clear copy bit. A later SK_MSG verdict can then expose sg_virt(sge) as writable ctx->data and BPF stores can modify the original page cache. Keep sg.copy synchronized with sg.data[] whenever entries are transferred, shifted, split, or copied into a new sk_msg. Clear the bit when an entry is replaced by a newly allocated private page or freed. This covers the BPF pull/push/pop helpers, sk_msg_shift_left/right(), sk_msg_xfer(), and tls_split_open_record(), including the partial tail entry created during TLS open-record splitting.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < f126eed589eec6f201405abbc398844042ef6d57
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 31a110642b5fb5e61940cbcfb503445ac4f28017
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 9bb86d8184b37503816150c4a6ad3c17dfdbe827
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 0eb4c16c4adb262763bda870a8ed38a1a9dec7ec
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < d22cc92bc41290e5783a72375e0843d9435f6001
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 1acdd14c0990dd1cd4b6534f00366d2e6dfce05f
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 21ed9540a8e1906dfcbc1bb82ba9b4de4fa4bd6d
- >= d3b18ad31f93d0b6bae105c679018a1ba7daa9ca, < 406e8a651a7b854c41fecd5117bb282b3a6c2c6b
Fixed in f126eed589eec6f201405abbc398844042ef6d57, 31a110642b5fb5e61940cbcfb503445ac4f28017, 9bb86d8184b37503816150c4a6ad3c17dfdbe827, 0eb4c16c4adb262763bda870a8ed38a1a9dec7ec, d22cc92bc41290e5783a72375e0843d9435f6001, 1acdd14c0990dd1cd4b6534f00366d2e6dfce05f, 21ed9540a8e1906dfcbc1bb82ba9b4de4fa4bd6d, 406e8a651a7b854c41fecd5117bb282b3a6c2c6b
- 4.20
Fixed in 0, 5.10.261, 5.15.212, 6.1.177, 6.6.144, 6.12.95, 6.18.38, 7.1.3, 7.2
Mitigation
Upgrade Linux to f126eed589eec6f201405abbc398844042ef6d57 or 31a110642b5fb5e61940cbcfb503445ac4f28017 or 9bb86d8184b37503816150c4a6ad3c17dfdbe827 or 0eb4c16c4adb262763bda870a8ed38a1a9dec7ec or d22cc92bc41290e5783a72375e0843d9435f6001 or 1acdd14c0990dd1cd4b6534f00366d2e6dfce05f or 21ed9540a8e1906dfcbc1bb82ba9b4de4fa4bd6d or 406e8a651a7b854c41fecd5117bb282b3a6c2c6b or later.
Upgrade Linux to 0 or 5.10.261 or 5.15.212 or 6.1.177 or 6.6.144 or 6.12.95 or 6.18.38 or 7.1.3 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.