In the Linux kernel, the following vulnerability has been resolved:
nbd: fix uaf in nbd_open
Commit 4af5f2e03013 ("nbd: use blkmqallocdisk and blkcleanupdisk") cleans up disk by blkcleanupdisk() and it won't set disk->privatedata as NULL as before. UAF may be triggered in nbdopen() if someone tries to open nbd device right after nbdput() since nbd has been free in nbddevremove().
Fix this by implementing ->free_disk and free private data in it.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@879947f4180bc6e83af64eb0515e0cf57fce15db",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-21cd7d18",
"digest": {
"threshold": 0.9,
"line_hashes": [
"241278684828770172018825890974295028009",
"52126995608373830180836463022700340410",
"250262879988443759638593774267995562608",
"133644468530881695212607845341052066083",
"235569097776759396714547149018345568313",
"290699982851861675771061313328416779200",
"262693718463212930325062903996932135769",
"191245696005573373464279962909965686162",
"16644805479774957135987022256069910662",
"163374787843869954639178974484168520040",
"115799142871319936369029841173725717311",
"92413670129057170830927274028129026169",
"308009939508073735681661602299716100783",
"192798757089417238517841367117962486917",
"297627863424390966237394163551712674176"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@327462725b0f759f093788dfbcb2f1fd132f956b",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-311e0b38",
"digest": {
"threshold": 0.9,
"line_hashes": [
"241278684828770172018825890974295028009",
"52126995608373830180836463022700340410",
"250262879988443759638593774267995562608",
"133644468530881695212607845341052066083",
"235569097776759396714547149018345568313",
"290699982851861675771061313328416779200",
"262693718463212930325062903996932135769",
"191245696005573373464279962909965686162",
"16644805479774957135987022256069910662",
"163374787843869954639178974484168520040",
"115799142871319936369029841173725717311",
"92413670129057170830927274028129026169",
"308009939508073735681661602299716100783",
"192798757089417238517841367117962486917",
"297627863424390966237394163551712674176"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@56bd7901b5e9dbc9112036ea615ebcba1565fafe",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "nbd_dev_remove",
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-4cc714ad",
"digest": {
"length": 314.0,
"function_hash": "144066462621623238064981384252424812082"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@56bd7901b5e9dbc9112036ea615ebcba1565fafe",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-5506784e",
"digest": {
"threshold": 0.9,
"line_hashes": [
"241278684828770172018825890974295028009",
"52126995608373830180836463022700340410",
"250262879988443759638593774267995562608",
"133644468530881695212607845341052066083",
"235569097776759396714547149018345568313",
"290699982851861675771061313328416779200",
"262693718463212930325062903996932135769",
"191245696005573373464279962909965686162",
"16644805479774957135987022256069910662",
"163374787843869954639178974484168520040",
"115799142871319936369029841173725717311",
"92413670129057170830927274028129026169",
"308009939508073735681661602299716100783",
"192798757089417238517841367117962486917",
"297627863424390966237394163551712674176"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@879947f4180bc6e83af64eb0515e0cf57fce15db",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "nbd_dev_remove",
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-77fe3eee",
"digest": {
"length": 314.0,
"function_hash": "144066462621623238064981384252424812082"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@327462725b0f759f093788dfbcb2f1fd132f956b",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "nbd_dev_remove",
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-9d534ff8",
"digest": {
"length": 314.0,
"function_hash": "144066462621623238064981384252424812082"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4e9b3ec84dc97909876641dad14e0a2300d6c2a3",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "nbd_dev_remove",
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-c2d9c151",
"digest": {
"length": 314.0,
"function_hash": "144066462621623238064981384252424812082"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4e9b3ec84dc97909876641dad14e0a2300d6c2a3",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/block/nbd.c"
},
"id": "CVE-2023-52837-f5714d02",
"digest": {
"threshold": 0.9,
"line_hashes": [
"241278684828770172018825890974295028009",
"52126995608373830180836463022700340410",
"250262879988443759638593774267995562608",
"133644468530881695212607845341052066083",
"235569097776759396714547149018345568313",
"290699982851861675771061313328416779200",
"262693718463212930325062903996932135769",
"191245696005573373464279962909965686162",
"16644805479774957135987022256069910662",
"163374787843869954639178974484168520040",
"115799142871319936369029841173725717311",
"92413670129057170830927274028129026169",
"308009939508073735681661602299716100783",
"192798757089417238517841367117962486917",
"297627863424390966237394163551712674176"
]
},
"signature_type": "Line"
}
]