In the Linux kernel, the following vulnerability has been resolved:
net: drop UFO packets in udprcvsegment()
When sending a packet with virtionethdr to tun device, if the gsotype in virtionethdr is SKBGSOUDP and the gsosize is less than udphdr size, below crash may happen.
------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:4572! Oops: invalid opcode: 0000 [#1] SMP NOPTI CPU: 0 UID: 0 PID: 62 Comm: mytest Not tainted 6.16.0-rc7 #203 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:skbpullrcsum+0x8e/0xa0 Code: 00 00 5b c3 cc cc cc cc 8b 93 88 00 00 00 f7 da e8 37 44 38 00 f7 d8 89 83 88 00 00 00 48 8b 83 c8 00 00 00 5b c3 cc cc cc cc <0f> 0b 0f 0b 66 66 2e 0f 1f 84 00 000 RSP: 0018:ffffc900001fba38 EFLAGS: 00000297 RAX: 0000000000000004 RBX: ffff8880040c1000 RCX: ffffc900001fb948 RDX: ffff888003e6d700 RSI: 0000000000000008 RDI: ffff88800411a062 RBP: ffff8880040c1000 R08: 0000000000000000 R09: 0000000000000001 R10: ffff888003606c00 R11: 0000000000000001 R12: 0000000000000000 R13: ffff888004060900 R14: ffff888004050000 R15: ffff888004060900 FS: 000000002406d3c0(0000) GS:ffff888084a19000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000040 CR3: 0000000004007000 CR4: 00000000000006f0 Call Trace: <TASK> udpqueuercvoneskb+0x176/0x4b0 net/ipv4/udp.c:2445 udpqueuercvskb+0x155/0x1f0 net/ipv4/udp.c:2475 udpunicastrcvskb+0x71/0x90 net/ipv4/udp.c:2626 _udp4librcv+0x433/0xb00 net/ipv4/udp.c:2690 ipprotocoldeliverrcu+0xa6/0x160 net/ipv4/ipinput.c:205 iplocaldeliverfinish+0x72/0x90 net/ipv4/ipinput.c:233 ipsublistrcvfinish+0x5f/0x70 net/ipv4/ipinput.c:579 ipsublistrcv+0x122/0x1b0 net/ipv4/ipinput.c:636 iplistrcv+0xf7/0x130 net/ipv4/ipinput.c:670 _netifreceiveskblistcore+0x21d/0x240 net/core/dev.c:6067 netifreceiveskblistinternal+0x186/0x2b0 net/core/dev.c:6210 napicompletedone+0x78/0x180 net/core/dev.c:6580 tungetuser+0xa63/0x1120 drivers/net/tun.c:1909 tunchrwriteiter+0x65/0xb0 drivers/net/tun.c:1984 vfswrite+0x300/0x420 fs/readwrite.c:593 ksyswrite+0x60/0xd0 fs/readwrite.c:686 dosyscall64+0x50/0x1c0 arch/x86/entry/syscall64.c:63 </TASK>
To trigger gso segment in udpqueuercvskb(), we should also set option UDPENCAPESPINUDP to enable udpsk(sk)->encaprcv. When the encaprcv hook return 1 in udpqueuercvoneskb(), udpcsumpull_header() will try to pull udphdr, but the skb size has been segmented to gso size, which leads to this crash.
Previous commit cf329aa42b66 ("udp: cope with UDP GRO packet misdirection") introduces segmentation in UDP receive path only for GRO, which was never intended to be used for UFO, so drop UFO packets in udprcvsegment().
[
{
"deprecated": false,
"id": "CVE-2025-38622-0d355764",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4c1022220b1b6fea802175e80444923a3bbf93a5",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-142bfec2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c639c6479ec4480372901a5fc566f7588cf5522",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-279f113f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@791f32c5eab33ca3a153f8f6f763aa0df1ddc320",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-2eec2df5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fc45b3f9599b657d4a64bcf423d2a977b3e13a49",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-5a3ab393",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0ec2e47f1e92d69b42b17a4a1e543256778393e",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-5a6e93ab",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c639c6479ec4480372901a5fc566f7588cf5522",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-603e75c5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d46e51f1c78b9ab9323610feb14238d06d46d519",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-6cedce0c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6ad849d59256dcc0e2234844ef9f0daf885f5c",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-7df25e6b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@791f32c5eab33ca3a153f8f6f763aa0df1ddc320",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-8d8cf178",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@72f97d3cb791e26492236b2be7fd70d2c6222555",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-92379e74",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4c1022220b1b6fea802175e80444923a3bbf93a5",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-924b2579",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@72f97d3cb791e26492236b2be7fd70d2c6222555",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"40993533059876441965960009658058662802"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-972d80d1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fc45b3f9599b657d4a64bcf423d2a977b3e13a49",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-999e9c88",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0ec2e47f1e92d69b42b17a4a1e543256778393e",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-9cd811d5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d46e51f1c78b9ab9323610feb14238d06d46d519",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-aa4c98cd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d45954034f8edd6d4052e0190d3d6335c37e4de",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"128537874590507080923044724303607675078",
"307616384152686517498480585118352804561"
]
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-bc853004",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d45954034f8edd6d4052e0190d3d6335c37e4de",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h",
"function": "udp_rcv_segment"
},
"signature_type": "Function",
"digest": {
"function_hash": "273638362811009886278869346528353969933",
"length": 569.0
}
},
{
"deprecated": false,
"id": "CVE-2025-38622-fde26efb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6ad849d59256dcc0e2234844ef9f0daf885f5c",
"signature_version": "v1",
"target": {
"file": "include/net/udp.h"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"85540751487033423111049901532434868109",
"70159673240803104974380423989799051989",
"26667902552754092808004765371726917598",
"116031708237791193661516693329083468748",
"35501343431438138618968652490890307525",
"172593977211542501535460063717381731050",
"27168198624755435437833190575729231692",
"289452615372340817411354794244090191143",
"280477150728208886522778818072846148714",
"138508096638292825180491592143249944201",
"321466448226495993783495749328207983571",
"283392103344459491312148953025090432249",
"315807594180942141867047159534065179794",
"242777012644877937455773608797444676287",
"11628101417187856253021536033949674101"
]
}
}
]