In the Linux kernel, the following vulnerability has been resolved:
io_uring: lock overflowing for IOPOLL
syzbot reports an issue with overflow filling for IOPOLL:
WARNING: CPU: 0 PID: 28 at iouring/iouring.c:734 iocqringeventoverflow+0x1c0/0x230 iouring/iouring.c:734 CPU: 0 PID: 28 Comm: kworker/u4:1 Not tainted 6.2.0-rc3-syzkaller-16369-g358a161a6a9e #0 Workqueue: eventsunbound ioringexitwork Call trace: iocqringeventoverflow+0x1c0/0x230 iouring/iouring.c:734 ioreqcqeoverflow+0x5c/0x70 iouring/iouring.c:773 iofillcqereq iouring/iouring.h:168 [inline] iodoiopoll+0x474/0x62c iouring/rw.c:1065 ioiopolltryreapevents+0x6c/0x108 iouring/iouring.c:1513 iouringtrycancelrequests+0x13c/0x258 iouring/iouring.c:3056 ioringexitwork+0xec/0x390 iouring/iouring.c:2869 processonework+0x2d8/0x504 kernel/workqueue.c:2289 workerthread+0x340/0x610 kernel/workqueue.c:2436 kthread+0x12c/0x158 kernel/kthread.c:376 retfrom_fork+0x10/0x20 arch/arm64/kernel/entry.S:863
There is no real problem for normal IOPOLL as flush is also called with uring_lock taken, but it's getting more complicated for IOPOLL|SQPOLL, for which _iocqringoverflowflush() happens from the CQ waiting path.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52903.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52903.json"
[
{
"signature_version": "v1",
"target": {
"file": "io_uring/rw.c",
"function": "io_do_iopoll"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fc3990dad04a677606337ebc61964094d6cb41b",
"deprecated": false,
"digest": {
"function_hash": "258234207718112625481368106049118985117",
"length": 1569.0
},
"id": "CVE-2023-52903-2b2a9d00",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "io_uring/rw.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fc3990dad04a677606337ebc61964094d6cb41b",
"deprecated": false,
"digest": {
"line_hashes": [
"337525430710023578808328254763671731730",
"200408290647223605431646296255926996431",
"62564129185040074288667733001142416202",
"119268681894838093235101341795374334922"
],
"threshold": 0.9
},
"id": "CVE-2023-52903-98a63330",
"signature_type": "Line"
}
]