{"id":"CVE-2026-142873","summary":"ALSA: usb-audio: qcom: Check the return value of qmi_handle_init()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: qcom: Check the return value of qmi_handle_init()\n\nqc_usb_audio_probe() overwrites the return value of qmi_handle_init()\nwith that of qmi_add_server() without checking it. When\nqmi_handle_init() fails, it has already freed the receive buffer and\ndestroyed the workqueue, and qmi-\u003esock may hold an error pointer. If\nQRTR is not available, qmi_handle_init() returns -EPROBE_DEFER and\nqmi-\u003esock is ERR_PTR(-EAFNOSUPPORT), so qmi_add_server() passes it to\nkernel_sendmsg():\n\n  BUG: unable to handle page fault for address: ffffffffffffffb7\n  RIP: 0010:selinux_socket_sendmsg+0xa0/0x590\n  Call Trace:\n   security_socket_sendmsg+0x29/0x50\n   __sock_sendmsg+0x43/0x150\n   kernel_sendmsg+0xd6/0x180\n   qmi_send_new_server+0x1b8/0x2b0\n   qmi_add_server+0x165/0x200\n   qc_usb_audio_probe+0xf4/0x2e0\n   really_probe+0x2b4/0x850\n\nHad the probe gone on, the error and remove paths would call\nqmi_handle_release() on the half-initialized handle, which destroys the\nworkqueue and frees the receive buffer a second time.\n\nReturn the error from qmi_handle_init(), so that -EPROBE_DEFER defers\nthe probe, and check qmi_add_server() as well.\n\nThe bug was found with kbound, a static analysis prototype for\nownership mismatches at kernel interfaces, on v7.2.12; it is present in\nmainline.\n\nBuild-tested with x86_64 and arm64 allmodconfig (W=1, sparse): no new\nwarnings. Run-tested on QEMU (x86_64, KVM) with KASAN and kmemleak, with\nthe driver built in and a test module that registers the\nq6usb.qc-usb-audio-offload auxiliary device. Without QRTR, the probe\ncrashes as above without this patch; with it the device is deferred and\nremoving it again reports nothing. With QRTR the probe succeeds, and\nremoval reports nothing either.","modified":"2026-12-03T05:01:03.315025402Z","published":"2026-12-03T03:23:32.586Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142873.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a3cf5ebab5f1db9e6f751e2a08df05a84f37ea57"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a3eafb95da4a02ea656bf4d5ad735b953ae5626e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bcb37b8abc6d4a1e2a6e7983d86a24e25f7ab53a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142873.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142873"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"326bbc348298ab0946c5560defe024a5f6ef28bb"},{"fixed":"a3eafb95da4a02ea656bf4d5ad735b953ae5626e"},{"fixed":"bcb37b8abc6d4a1e2a6e7983d86a24e25f7ab53a"},{"fixed":"a3cf5ebab5f1db9e6f751e2a08df05a84f37ea57"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142873.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142873.json"}}],"schema_version":"1.9.2"}