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 uringlock taken, but it's getting more complicated for IOPOLL|SQPOLL, for which _iocqringoverflow_flush() happens from the CQ waiting path.
[
{
"id": "CVE-2023-52903-00d3f3ae",
"deprecated": false,
"digest": {
"line_hashes": [
"58834572309865844288661245772197009652",
"245097848934928332460771596835897555064",
"201505742594026001015248152870824527913",
"302977622982201095185141510882009879834",
"198125855726268607410196573737734406766",
"213260048688280512126314479036251809474",
"314614914216000052758560787905513864793",
"113408418107599598612907063940352314832"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "io_uring/io_uring.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ed4629d1e968359fbb91d0a3780b1e86a2c08845",
"signature_type": "Line"
},
{
"id": "CVE-2023-52903-1b1af2bd",
"deprecated": false,
"digest": {
"length": 1569.0,
"function_hash": "258234207718112625481368106049118985117"
},
"signature_version": "v1",
"target": {
"function": "io_do_iopoll",
"file": "io_uring/rw.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@544d163d659d45a206d8929370d5a2984e546cb7",
"signature_type": "Function"
},
{
"id": "CVE-2023-52903-2b2a9d00",
"deprecated": false,
"digest": {
"length": 1569.0,
"function_hash": "258234207718112625481368106049118985117"
},
"signature_version": "v1",
"target": {
"function": "io_do_iopoll",
"file": "io_uring/rw.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fc3990dad04a677606337ebc61964094d6cb41b",
"signature_type": "Function"
},
{
"id": "CVE-2023-52903-53b18b77",
"deprecated": false,
"digest": {
"line_hashes": [
"58834572309865844288661245772197009652",
"245097848934928332460771596835897555064",
"201505742594026001015248152870824527913",
"302977622982201095185141510882009879834",
"198125855726268607410196573737734406766",
"213260048688280512126314479036251809474",
"314614914216000052758560787905513864793",
"113408418107599598612907063940352314832"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "io_uring/io_uring.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de77faee280163ff03b7ab64af6c9d779a43d4c4",
"signature_type": "Line"
},
{
"id": "CVE-2023-52903-98a63330",
"deprecated": false,
"digest": {
"line_hashes": [
"337525430710023578808328254763671731730",
"200408290647223605431646296255926996431",
"62564129185040074288667733001142416202",
"119268681894838093235101341795374334922"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "io_uring/rw.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fc3990dad04a677606337ebc61964094d6cb41b",
"signature_type": "Line"
},
{
"id": "CVE-2023-52903-cd415a4a",
"deprecated": false,
"digest": {
"length": 499.0,
"function_hash": "324967397321190949381784854818500582918"
},
"signature_version": "v1",
"target": {
"function": "io_iopoll_complete",
"file": "io_uring/io_uring.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ed4629d1e968359fbb91d0a3780b1e86a2c08845",
"signature_type": "Function"
},
{
"id": "CVE-2023-52903-ce34e801",
"deprecated": false,
"digest": {
"length": 499.0,
"function_hash": "324967397321190949381784854818500582918"
},
"signature_version": "v1",
"target": {
"function": "io_iopoll_complete",
"file": "io_uring/io_uring.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de77faee280163ff03b7ab64af6c9d779a43d4c4",
"signature_type": "Function"
},
{
"id": "CVE-2023-52903-e3bf2582",
"deprecated": false,
"digest": {
"line_hashes": [
"12992646391648554199253383073564476750",
"320251719910588673374241114295284875803",
"183317274962527429792714990949783224538",
"105605367402736158541720530164979554517"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "io_uring/rw.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@544d163d659d45a206d8929370d5a2984e546cb7",
"signature_type": "Line"
}
]