In the Linux kernel, the following vulnerability has been resolved:
net: core: remove unnecessary framesz check in bpfxdpadjusttail()
Too BIG xdp->framesz = 131072 WARNING: CPU: 0 PID: 5020 at net/core/filter.c:4121 __bpfxdpadjusttail net/core/filter.c:4121 [inline] WARNING: CPU: 0 PID: 5020 at net/core/filter.c:4121 bpfxdpadjusttail+0x466/0xa10 net/core/filter.c:4103 ... Call Trace: <TASK> bpfprog4add87e5301a4105+0x1a/0x1c _bpfprogrun include/linux/filter.h:600 [inline] bpfprogrunxdp include/linux/filter.h:775 [inline] bpfprogrungenericxdp+0x57e/0x11e0 net/core/dev.c:4721 netifreceivegenericxdp net/core/dev.c:4807 [inline] doxdpgeneric+0x35c/0x770 net/core/dev.c:4866 tungetuser+0x2340/0x3ca0 drivers/net/tun.c:1919 tunchrwriteiter+0xe8/0x210 drivers/net/tun.c:2043 callwriteiter include/linux/fs.h:1871 [inline] newsyncwrite fs/readwrite.c:491 [inline] vfswrite+0x650/0xe40 fs/readwrite.c:584 ksyswrite+0x12f/0x250 fs/readwrite.c:637 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x38/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd
xdp->framesz > PAGESIZE check was introduced in commit c8741e2bfe87 ("xdp: Allow bpfxdpadjusttail() to grow packet size"). But Jesper Dangaard Brouer jbrouer@redhat.com noted that after introducing the xdpinitbuff() which all XDP driver use - it's safe to remove this check. The original intend was to catch cases where XDP drivers have not been updated to use xdp.framesz, but that is not longer a concern (since xdpinitbuff).
Running the initial syzkaller repro it was discovered that the contiguous physical memory allocation is used for both xdp paths in tungetuser(), e.g. tunbuildskb() and tunallocskb(). It was also stated by Jesper Dangaard Brouer jbrouer@redhat.com that XDP can work on higher order pages, as long as this is contiguous physical memory (e.g. a page).
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54155.json",
"cna_assigner": "Linux"
}