{"id":"AZL-117875","summary":"CVE-2026-142985 affecting package kernel 6.6.161.1-1","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_serial: fix NULL deref in gs_close() after failed open\n\ngs_close() opens with\n\n\tstruct gs_port *port = tty-\u003edriver_data;\n\t...\n\tspin_lock_irq(&port-\u003eport_lock);\n\nand never checks port.  gs_open() assigns tty-\u003edriver_data only on the\nport.count 0 -\u003e 1 edge, so any failure earlier in gs_open() leaves it NULL,\nand tty_open() calls tty_release(), and hence -\u003eclose(), when -\u003eopen()\nfails.\n\nsyzbot hit exactly this on arm64.  Fault injection failed the kfifo_alloc()\nof the write buffer in gs_open():\n\n   __kfifo_alloc_node+0x10c/0x208 lib/kfifo.c:44\n   gs_open+0x144/0x514 drivers/usb/gadget/function/u_serial.c:636\n   tty_open+0x404/0x89c drivers/tty/tty_io.c:2137\n\nand the tty core's close of the failed open then took port_lock through\nthe NULL port:\n\n  BUG: unable to handle kernel paging request in gs_close\n  KASAN: null-ptr-deref in range [0x00000000000003a0-0x00000000000003a7]\n  Call trace:\n   spin_lock_irq include/linux/spinlock.h:372 [inline]\n   gs_close+0xac/0x65c drivers/usb/gadget/function/u_serial.c:698\n   tty_release+0x2c4/0xffc drivers/tty/tty_io.c:1745\n   tty_open+0x46c/0x89c drivers/tty/tty_io.c:2146\n\nReturn early instead.  There is nothing to release when the open never got\nfar enough to claim the port.\n\nUnlike the check reverted by commit f6c7bc4a6823 (\"Revert \"usb: gadget:\nu_serial: Add null pointer check in gs_start_io\"\"), this is not hiding a\nrace: the tty core calls -\u003eclose() for an -\u003eopen() that failed by design,\nso driver_data is legitimately unset on that path.","modified":"2026-12-04T14:18:39.487775966Z","published":"2026-12-03T10:17:22Z","upstream":["CVE-2026-142985"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142985"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-117875.json"}}],"schema_version":"1.9.2"}