CVE-2026-53304: scsi: sg: Resolve soft lockup issue when opening /dev/sgX

Published Jun 26, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

scsi: sg: Resolve soft lockup issue when opening /dev/sgX

The parameter defreservedsize defines the default buffer size reserved for each Sgfd and should be restricted to a range between 0 and 1,048,576 (see https://tldp.org/HOWTO/SCSI-Generic-HOWTO/proc.html). Although the function sgprocwritedressz enforces this limit, it is possible to bypass it by directly modifying the module parameter as shown below, which then causes a soft lockup:

echo -1 > /sys/module/sg/parameters/defreservedsize exec 4<> /dev/sg0

watchdog: BUG: soft lockup - CPU#5 stuck for 26 seconds! [bash:537] Modules loaded: CPU: 5 UID: 0 PID: 537 Command: bash, kernel version 6.19.0-rc3+ #134, PREEMPT disabled Hardware: QEMU Standard PC (i440FX + PIIX, 1996), BIOS version 1.16.1-2.fc37 dated 04/01/2014 ... Call Trace:

sgbuildreserve+0x5c/0xa0 sgaddsfp+0x168/0x270 sgopen+0x16e/0x340 chrdevopen+0xbe/0x230 dodentryopen+0x175/0x480 vfsopen+0x34/0xf0 doopen+0x265/0x3d0 pathopenat+0x110/0x290 dofilpopen+0xc3/0x170 dosysopenat2+0x71/0xe0 x64sysopenat+0x6d/0xa0 dosyscall64+0x62/0x310 entrySYSCALL64afterhwframe+0x76/0x7e

The fix is to use moduleparamcb to validate and reject invalid values assigned to defreservedsize.

Affected Software

9 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=2.6.19<5.10.258
Linux Linux kernel>=5.11<5.15.209
Linux Linux kernel>=5.16<6.1.175
Linux Linux kernel>=6.2<6.6.141
Linux Linux kernel>=6.7<6.12.91
Linux Linux kernel>=6.13<6.18.33
Linux Linux kernel>=6.19<7.0.10
Microsoft azl3 kernel 6.6.139.1-1<6.6.143.1-1
6.6.143.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.143.1-1
  2. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Fixed in 6.19.0-rc3+
  3. Configuration

    Do not set /sys/module/sg/parameters/def_reserved_size outside the allowed range; ensure it is constrained to between 0 and 1,048,576 because direct modification can bypass sg_proc_write_dressz validation and trigger a soft lockup when opening /dev/sgX.

    scsi-generic (sg) kernel module def_reserved_size = Restrict to range 0 to 1048576
  4. Operational

    Revert any unsafe value previously written to /sys/module/sg/parameters/def_reserved_size (e.g., values like -1 shown in the example) to an allowed value within 0 to 1,048,576.

Event History

Jun 26, 2026
CVE Published
via MITRE·07:41 PM
Data Sourced
via MITRE·07:41 PM
Description
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 28, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:02 AM
Affected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-53304?

The severity of CVE-2026-53304 is rated as 26.

2

How do I fix CVE-2026-53304?

To fix CVE-2026-53304, update the Linux kernel to the latest version that addresses this vulnerability.

3

What impacts does CVE-2026-53304 have on my system?

CVE-2026-53304 can cause soft lockup issues when opening /dev/sgX, affecting system stability.

4

Which versions of the Linux kernel are affected by CVE-2026-53304?

CVE-2026-53304 affects specific versions of the Linux kernel that do not enforce ranges on the def_reserved_size parameter.

5

Is there a workaround for CVE-2026-53304?

A workaround for CVE-2026-53304 may involve manually adjusting the def_reserved_size parameter within the allowed range until an update can be applied.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203