{"id":"CVE-2026-53304","summary":"scsi: sg: Resolve soft lockup issue when opening /dev/sgX","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: sg: Resolve soft lockup issue when opening /dev/sgX\n\nThe parameter def_reserved_size defines the default buffer size reserved\nfor each Sg_fd and should be restricted to a range between 0 and 1,048,576\n(see https://tldp.org/HOWTO/SCSI-Generic-HOWTO/proc.html).  Although the\nfunction sg_proc_write_dressz enforces this limit, it is possible to bypass\nit by directly modifying the module parameter as shown below, which then\ncauses a soft lockup:\n\necho -1 \u003e /sys/module/sg/parameters/def_reserved_size\nexec 4\u003c\u003e /dev/sg0\n\nwatchdog: BUG: soft lockup - CPU#5 stuck for 26 seconds! [bash:537]\nModules loaded:\nCPU: 5 UID: 0 PID: 537 Command: bash, kernel version 6.19.0-rc3+ #134,\nPREEMPT disabled\nHardware: QEMU Standard PC (i440FX + PIIX, 1996), BIOS version\n1.16.1-2.fc37 dated 04/01/2014\n...\nCall Trace:\n\n  sg_build_reserve+0x5c/0xa0\n  sg_add_sfp+0x168/0x270\n  sg_open+0x16e/0x340\n  chrdev_open+0xbe/0x230\n  do_dentry_open+0x175/0x480\n  vfs_open+0x34/0xf0\n  do_open+0x265/0x3d0\n  path_openat+0x110/0x290\n  do_filp_open+0xc3/0x170\n  do_sys_openat2+0x71/0xe0\n  __x64_sys_openat+0x6d/0xa0\n  do_syscall_64+0x62/0x310\n  entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nThe fix is to use module_param_cb to validate and reject invalid values\nassigned to def_reserved_size.","modified":"2026-07-08T08:07:25.165498406Z","published":"2026-06-26T19:41:00.056Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53304.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1afd963fcd963db0dc5d47df6dfcf010c9c4647e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3d74e0654ac908c65a8f20373091826fe43b1363"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9676ca7b1ef31a3a65b3e61e7ce3b54ce7364202"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c47ccfb3d80dfed522ca06a5954ac97488d78c5a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c5f4a211e82d04ccc1809311322c47023bbe66e2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d06a310b45e153872033dd0cf19d5a2279121099"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fe671d3c84ffb1b763d590c25195755adeaadaba"},{"type":"WEB","url":"https://git.kernel.org/stable/c/feade299e932967de27519338d41de348fb5b061"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53304.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53304"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6460e75a104d10458817d2f5b2fbff775bf0b43a"},{"fixed":"3d74e0654ac908c65a8f20373091826fe43b1363"},{"fixed":"c47ccfb3d80dfed522ca06a5954ac97488d78c5a"},{"fixed":"fe671d3c84ffb1b763d590c25195755adeaadaba"},{"fixed":"c5f4a211e82d04ccc1809311322c47023bbe66e2"},{"fixed":"9676ca7b1ef31a3a65b3e61e7ce3b54ce7364202"},{"fixed":"1afd963fcd963db0dc5d47df6dfcf010c9c4647e"},{"fixed":"feade299e932967de27519338d41de348fb5b061"},{"fixed":"d06a310b45e153872033dd0cf19d5a2279121099"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53304.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.6.19"},{"fixed":"5.10.258"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.209"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.175"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.141"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.91"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.33"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.10"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53304.json"}}],"schema_version":"1.7.5"}