inet: frags: bound the wmem charge of the socket completing a reassembly

Summary

CVECVE-2026-139793
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:20:13 UTC
Updated2026-11-30 14:20:13 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: inet: frags: bound the wmem charge of the socket completing a reassembly When a socket owned fragment completes a reassembly queue, inet_frag_reasm_prepare() and inet_frag_reasm_finish() charge the truesize of all other fragments to its sk_wmem_alloc. These fragments were orphaned when queued, and might have been sent by someone else, for instance padded TUN packets. Commit 3ae20e4697eb ("inet: frags: limit the truesize of a reassembly queue") bounds this charge to INT_MAX / 2 per queue, but a socket can complete several queues while the reassembled skbs are still alive, for instance held in a qdisc. sk_wmem_alloc can then go past INT_MAX, refcount_add() saturates it with a WARN, and the socket is leaked. This is reachable from an unprivileged user/network namespace, by raising ipfrag_high_thresh. Refuse the reassembly if the charge would push sk_wmem_alloc above 2 * sk_sndbuf, the bound ip_append_data() uses, plus 4MB of slack for fragments inflated by a refragmentation with a small MTU, and never above INT_MAX / 2. The cap matters for tun sockets, which use sk_sndbuf = INT_MAX, and whose skbs are still owned when act_ct or openvswitch reassemble them at ingress. Several queues can complete at the same time on different cpus for the same socket, so the charge is reserved with a cmpxchg() loop in inet_frag_reasm_prepare(), before it modifies the queue, and settled in inet_frag_reasm_finish(). Move the size checks of ip_frag_reasm(), ip6_frag_reasm() and nf_ct_frag6_reasm() before inet_frag_reasm_prepare(), using the first fragment which becomes the head, so that a successful inet_frag_reasm_prepare() is always followed by inet_frag_reasm_finish(). All callers already kill the queue when inet_frag_reasm_prepare() returns NULL. Found by code inspection (AI review), not reproduced.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected f4877225313d474659ee53150ccc3d553a978727 2970a56311e4b26e12acdc9c53887243283e8b02 git Not specified
CNA Linux Linux affected 18685451fc4e546fc0e718580d32df3c0e5c8272 6ee928d489fae99aa2108dff346b5afa142b9d3d git Not specified
CNA Linux Linux affected 18685451fc4e546fc0e718580d32df3c0e5c8272 dad6663a5dbf5f23c5921f0e2d0709560d388fa6 git Not specified
CNA Linux Linux affected 18685451fc4e546fc0e718580d32df3c0e5c8272 38f0414192e7ed0a7f250a64d5dfacd6d6139098 git Not specified
CNA Linux Linux affected 18685451fc4e546fc0e718580d32df3c0e5c8272 b71c101bbb9814d163c00234d43c41f0a17907d4 git Not specified
CNA Linux Linux affected 1b6de5e6575b56502665c65cf93b0ae6aa0f51ab git Not specified
CNA Linux Linux affected 9705f447bf9a6cd088300ad2c407b5e1c6591091 git Not specified
CNA Linux Linux affected 4318608dc28ef184158b4045896740716bea23f0 git Not specified
CNA Linux Linux affected 7d0567842b78390dd9b60f00f1d8f838d540e325 git Not specified
CNA Linux Linux affected e09cbe017311508c21e0739e97198a8388b98981 git Not specified
CNA Linux Linux affected 6.6.26 6.6.163 semver Not specified
CNA Linux Linux affected 5.4.285 5.5 semver Not specified
CNA Linux Linux affected 5.10.227 5.11 semver Not specified
CNA Linux Linux affected 5.15.168 5.16 semver Not specified
CNA Linux Linux affected 6.1.85 6.2 semver Not specified
CNA Linux Linux affected 6.8.5 6.9 semver Not specified
CNA Linux Linux affected 6.9 Not specified
CNA Linux Linux unaffected 6.9 semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.119 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.65 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc3 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/b71c101bbb9814d163c00234d43c41f0a17907d4 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/6ee928d489fae99aa2108dff346b5afa142b9d3d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/38f0414192e7ed0a7f250a64d5dfacd6d6139098 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/dad6663a5dbf5f23c5921f0e2d0709560d388fa6 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/2970a56311e4b26e12acdc9c53887243283e8b02 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report