AZL-117875: CVE-2026-142985 affecting package kernel 6.6.161.1-1

Published Dec 3, 2026
·
Updated

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

usb: gadget: userial: fix NULL deref in gsclose() after failed open

gsclose() opens with

struct gsport port = tty->driverdata; ... spinlockirq(&port->portlock);

and never checks port. gsopen() assigns tty->driverdata only on the port.count 0 -> 1 edge, so any failure earlier in gsopen() leaves it NULL, and ttyopen() calls ttyrelease(), and hence ->close(), when ->open() fails.

syzbot hit exactly this on arm64. Fault injection failed the kfifoalloc() of the write buffer in gsopen():

kfifoallocnode+0x10c/0x208 lib/kfifo.c:44 gsopen+0x144/0x514 drivers/usb/gadget/function/userial.c:636 ttyopen+0x404/0x89c drivers/tty/ttyio.c:2137

and the tty core's close of the failed open then took portlock through the NULL port:

BUG: unable to handle kernel paging request in gsclose KASAN: null-ptr-deref in range [0x00000000000003a0-0x00000000000003a7] Call trace: spinlockirq include/linux/spinlock.h:372 [inline] gsclose+0xac/0x65c drivers/usb/gadget/function/userial.c:698 ttyrelease+0x2c4/0xffc drivers/tty/ttyio.c:1745 ttyopen+0x46c/0x89c drivers/tty/ttyio.c:2146

Return early instead. There is nothing to release when the open never got far enough to claim the port.

Unlike the check reverted by commit f6c7bc4a6823 ("Revert "usb: gadget: userial: Add null pointer check in gsstartio""), this is not hiding a race: the tty core calls ->close() for an ->open() that failed by design, so driverdata is legitimately unset on that path.

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In drivers/usb/gadget/function/u_serial.c, make gs_close() return early when tty->driver_data is NULL, before accessing port or taking port_lock.

Event History

Dec 3, 2026
Advisory Published
via OSV·10:17 AM
Data Sourced
via OSV·10:17 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What condition triggers the crash?

The crash occurs when gs_open() fails before it assigns tty->driver_data, leaving the port pointer NULL. The tty core then invokes gs_close() during cleanup of the failed open, and gs_close() dereferences the NULL port pointer while taking port_lock.

2

What type of failure was observed to trigger the vulnerable path?

The reported reproducer used fault injection to make kfifo_alloc() fail while gs_open() allocated its write buffer. This led to a NULL-pointer dereference in gs_close().

3

What is the likely impact if the condition is reached?

The provided report shows a kernel NULL-pointer dereference, reported by KASAN as a null-ptr-deref in gs_close(). The data does not describe impacts beyond this kernel fault.

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