{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-142985",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.341Z",
        "datePublished": "2026-12-03T09:17:16.423Z",
        "dateUpdated": "2026-12-03T09:17:16.423Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:17:16.423Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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->driver_data;\n\t...\n\tspin_lock_irq(&port->port_lock);\n\nand never checks port.  gs_open() assigns tty->driver_data only on the\nport.count 0 -> 1 edge, so any failure earlier in gs_open() leaves it NULL,\nand tty_open() calls tty_release(), and hence ->close(), when ->open()\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 ->close() for an ->open() that failed by design,\nso driver_data is legitimately unset on that path."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/u_serial.c"
                    ],
                    "versions": [
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "ece1756e054ffcb38a8aab7d0ab7d0e02e65dd99",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "ce8c7b4b562aa7c3847145dc2e3a2d0953a054b2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "63b69946c0de838af7324a504766fa13ad947d3d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "ea6e4e3a7c8453674337c7773cf3b101f328c876",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "d010585071193e268c4152df2b3281255280529b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c1dca562be8ada614ef193aa246c6f8705bcd6b9",
                            "lessThan": "ea6cf69ad03c8d85138830c0d2c3b946b5ae231d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/usb/gadget/function/u_serial.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.27",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.27",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.276",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.227",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc4",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "5.10.276"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "5.15.227"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.27",
                                    "versionEndExcluding": "7.4-rc4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/ece1756e054ffcb38a8aab7d0ab7d0e02e65dd99"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ce8c7b4b562aa7c3847145dc2e3a2d0953a054b2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/63b69946c0de838af7324a504766fa13ad947d3d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ea6e4e3a7c8453674337c7773cf3b101f328c876"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d010585071193e268c4152df2b3281255280529b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ea6cf69ad03c8d85138830c0d2c3b946b5ae231d"
                }
            ],
            "title": "usb: gadget: u_serial: fix NULL deref in gs_close() after failed open",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}