{"id":"CVE-2025-38513","summary":"wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev()\n\nThere is a potential NULL pointer dereference in zd_mac_tx_to_dev(). For\nexample, the following is possible:\n\n    \tT0\t\t\t    \t\tT1\nzd_mac_tx_to_dev()\n  /* len == skb_queue_len(q) */\n  while (len \u003e ZD_MAC_MAX_ACK_WAITERS) {\n\n\t\t\t\t\t  filter_ack()\n\t\t\t\t\t    spin_lock_irqsave(&q-\u003elock, flags);\n\t\t\t\t\t    /* position == skb_queue_len(q) */\n\t\t\t\t\t    for (i=1; i\u003cposition; i++)\n\t\t\t\t    \t      skb = __skb_dequeue(q)\n\n\t\t\t\t\t    if (mac-\u003etype == NL80211_IFTYPE_AP)\n\t\t\t\t\t      skb = __skb_dequeue(q);\n\t\t\t\t\t    spin_unlock_irqrestore(&q-\u003elock, flags);\n\n    skb_dequeue() -\u003e NULL\n\nSince there is a small gap between checking skb queue length and skb being\nunconditionally dequeued in zd_mac_tx_to_dev(), skb_dequeue() can return NULL.\nThen the pointer is passed to zd_mac_tx_status() where it is dereferenced.\n\nIn order to avoid potential NULL pointer dereference due to situations like\nabove, check if skb is not NULL before passing it to zd_mac_tx_status().\n\nFound by Linux Verification Center (linuxtesting.org) with SVACE.","modified":"2026-04-02T12:48:00.765069Z","published":"2025-08-16T10:55:00.254Z","related":["SUSE-SU-2025:03204-1","SUSE-SU-2025:03272-1","SUSE-SU-2025:03290-1","SUSE-SU-2025:03301-1","SUSE-SU-2025:03382-1","SUSE-SU-2025:03602-1","SUSE-SU-2025:03633-1","SUSE-SU-2025:03634-1","SUSE-SU-2025:20653-1","SUSE-SU-2025:20669-1","SUSE-SU-2025:20739-1","SUSE-SU-2025:20756-1","SUSE-SU-2026:20555-1","SUSE-SU-2026:20599-1","SUSE-SU-2026:20615-1","openSUSE-SU-2026:20287-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38513.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/014c34dc132015c4f918ada4982e952947ac1047"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5420de65efbeb6503bcf1d43451c9df67ad60298"},{"type":"WEB","url":"https://git.kernel.org/stable/c/602b4eb2f25668de15de69860ec99caf65b3684d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/74b1ec9f5d627d2bdd5e5b6f3f81c23317657023"},{"type":"WEB","url":"https://git.kernel.org/stable/c/adf08c96b963c7cd7ec1ee1c0c556228d9bedaae"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b24f65c184540dfb967479320ecf7e8c2e9220dc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c1958270de947604cc6de05fc96dbba256b49cf0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fcd9c923b58e86501450b9b442ccc7ce4a8d0fda"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38513.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38513"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"459c51ad6e1fc19e91a53798358433d3c08cd09d"},{"fixed":"c1958270de947604cc6de05fc96dbba256b49cf0"},{"fixed":"014c34dc132015c4f918ada4982e952947ac1047"},{"fixed":"b24f65c184540dfb967479320ecf7e8c2e9220dc"},{"fixed":"adf08c96b963c7cd7ec1ee1c0c556228d9bedaae"},{"fixed":"5420de65efbeb6503bcf1d43451c9df67ad60298"},{"fixed":"fcd9c923b58e86501450b9b442ccc7ce4a8d0fda"},{"fixed":"602b4eb2f25668de15de69860ec99caf65b3684d"},{"fixed":"74b1ec9f5d627d2bdd5e5b6f3f81c23317657023"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38513.json"}}],"schema_version":"1.7.5"}