Nixpkgs security tracker

Login with GitHub

Dismissed suggestions

These automatic suggestions were dismissed after initial triaging.

to select a suggestion for revision.

View:
Compact
Detailed
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
virtio_pci: fix vq info pointer lookup via wrong index

In the Linux kernel, the following vulnerability has been resolved: virtio_pci: fix vq info pointer lookup via wrong index Unbinding a virtio balloon device: echo virtio0 > /sys/bus/virtio/drivers/virtio_balloon/unbind triggers a NULL pointer dereference. The dmesg says: BUG: kernel NULL pointer dereference, address: 0000000000000008 [...] RIP: 0010:__list_del_entry_valid_or_report+0x5/0xf0 Call Trace: <TASK> vp_del_vqs+0x121/0x230 remove_common+0x135/0x150 virtballoon_remove+0xee/0x100 virtio_dev_remove+0x3b/0x80 device_release_driver_internal+0x187/0x2c0 unbind_store+0xb9/0xe0 kernfs_fop_write_iter.llvm.11660790530567441834+0xf6/0x180 vfs_write+0x2a9/0x3b0 ksys_write+0x5c/0xd0 do_syscall_64+0x54/0x230 entry_SYSCALL_64_after_hwframe+0x29/0x31 [...] </TASK> The virtio_balloon device registers 5 queues (inflate, deflate, stats, free_page, reporting) but only the first two are unconditional. The stats, free_page and reporting queues are each conditional on their respective feature bits. When any of these features are absent, the corresponding vqs_info entry has name == NULL, creating holes in the array. The root cause is an indexing mismatch introduced when vq info storage was changed to be passed as an argument. vp_find_vqs_msix() and vp_find_vqs_intx() store the info pointer at vp_dev->vqs[i], where 'i' is the caller's sparse array index. However, the virtqueue itself gets vq->index assigned from queue_idx, a dense index that skips NULL entries. When holes exist, 'i' and queue_idx diverge. Later, vp_del_vqs() looks up info via vp_dev->vqs[vq->index] using the dense index into the sparsely-populated array, and hits NULL. Fix this by storing info at vp_dev->vqs[queue_idx] instead of vp_dev->vqs[i], so the store index matches the lookup index (vq->index). Apply the fix to both the MSIX and INTX paths.

Affected products

Linux
  • ==6.11
  • <f7d380fb525c13bdd114369a1979c80c346e6abc
  • =<6.18.*
  • <41e6dc1a10036c9f47057033f19af7e52ec464b6
  • =<6.12.*
  • <075bc3c779e1ea7294afabdcb7e0a49536959b28
  • =<7.1.*
  • <6.11
  • =<*
  • <64a4c0befa77bcc01076aec9f93863ffd4ed06b7
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
ntfs: avoid calling post_write_mst_fixup() for invalid index_block

In the Linux kernel, the following vulnerability has been resolved: ntfs: avoid calling post_write_mst_fixup() for invalid index_block ntfs_icx_ib_sync_write() calls post_write_mst_fixup() when ntfs_ib_write() returns an error, intending to restore the buffer after a failed write. However, ntfs_ib_write() returns an error immediately if pre_write_mst_fixup() validation fails. The caller, ntfs_icx_ib_sync_write(), interprets any error as a write failure requiring rollback. It does not differentiate between I/O errors and validation failures, and calls post_write_mst_fixup() anyway. Since post_write_mst_fixup() assumes that the index_block contents is correct, it doesn't perform the boundary checks, which results in out-of-bounds memory access. An attacker can craft a malicious NTFS image with: - large index_block.usa_ofs offset, pointing outside the ntfs_record - index_block.usa_count = 0, causing integer underflow - or index_block.usa_count larger than actual number of sectors in the ntfs_record, causing out-of-bounds access KASAN reports describing the memory corruption: ================================================================== BUG: KASAN: slab-out-of-bounds in post_write_mst_fixup+0x19c/0x1d0 Read of size 2 at addr ffff8881586c9018 by task p/9428 Call Trace: <TASK> dump_stack_lvl+0x100/0x190 print_report+0x139/0x4ad ? post_write_mst_fixup+0x19c/0x1d0 ? __virt_addr_valid+0x262/0x500 ? post_write_mst_fixup+0x19c/0x1d0 kasan_report+0xe4/0x1d0 ? post_write_mst_fixup+0x19c/0x1d0 post_write_mst_fixup+0x19c/0x1d0 ntfs_icx_ib_sync_write+0x179/0x220 ntfs_inode_sync_filename+0x83d/0x1080 __ntfs_write_inode+0x1049/0x1480 ntfs_file_fsync+0x131/0x9b0 ================================================================== BUG: KASAN: slab-out-of-bounds in post_write_mst_fixup+0x1aa/0x1d0 Write of size 2 at addr ffff8881586c91fe by task p/9428 Call Trace: <TASK> dump_stack_lvl+0x100/0x190 print_report+0x139/0x4ad ? post_write_mst_fixup+0x1aa/0x1d0 ? __virt_addr_valid+0x262/0x500 ? post_write_mst_fixup+0x1aa/0x1d0 kasan_report+0xe4/0x1d0 ? post_write_mst_fixup+0x1aa/0x1d0 post_write_mst_fixup+0x1aa/0x1d0 ntfs_icx_ib_sync_write+0x179/0x220 ntfs_inode_sync_filename+0x83d/0x1080 __ntfs_write_inode+0x1049/0x1480 ntfs_file_fsync+0x131/0x9b0 ================================================================== Let's move the post_write_mst_fixup() call to ntfs_ib_write(). The ntfs_ib_write() function calls pre_write_mst_fixup() at the beginning. If the index_block contents is invalid, pre_write_mst_fixup() fails and ntfs_ib_write() returns early without calling post_write_mst_fixup() on bad index_block.

Affected products

Linux
  • ==7.1
  • <5b6eedd7cc2936f9238e852b553a1b326105bde8
  • =<7.1.*
  • =<*
  • <7.1
  • <e2018628301a6d9f54e34b0cb417f1688c66df1d
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
audit: Fix data races of skb_queue_len() readers on audit_queue

In the Linux kernel, the following vulnerability has been resolved: audit: Fix data races of skb_queue_len() readers on audit_queue Multiple readers access audit_queue.qlen via skb_queue_len() without holding the queue lock or using READ_ONCE(), while kauditd writes to this field via the skb_dequeue() → __skb_unlink() path with WRITE_ONCE() protected by a spinlock. This constitutes data races. All affected skb_queue_len(&audit_queue) call sites: - kauditd_thread() wait_event_freezable() condition - audit_receive_msg() AUDIT_GET handler (s.backlog assignment) - audit_receive() backlog check - audit_log_start() backlog check and pr_warn() KCSAN reports the following conflicting access pattern (one example): ================================================================== BUG: KCSAN: data-race in audit_log_start / skb_dequeue write (marked) to 0xffffffff8512ee20 of 4 bytes by task 661 on cpu 57: skb_dequeue+0x70/0xf0 kauditd_send_queue+0x71/0x220 kauditd_thread+0x1cb/0x430 kthread+0x1c2/0x210 ret_from_fork+0x162/0x1a0 ret_from_fork_asm+0x1a/0x30 read to 0xffffffff8512ee20 of 4 bytes by task 36586 on cpu 1: audit_log_start+0x2a0/0x6b0 audit_core_dumps+0x64/0xa0 do_coredump+0x14b/0x1260 get_signal+0xeb2/0xf70 arch_do_signal_or_restart+0x41/0x170 exit_to_user_mode_loop+0xa2/0x1c0 do_syscall_64+0x1a3/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0xe0 value changed: 0x00000001 -> 0x00000000 ================================================================== Resolve the race by switching to lockless helper skb_queue_len_lockless(), which internally uses READ_ONCE() and properly pairs with the WRITE_ONCE() write accesses already present on the writer side. [PM: line length tweak]

Affected products

Linux
  • <b35597bdae1a5d8395da4b9baa993b9b71f74d68
  • <c5186201fa7030289cc4fe23fae87a3fcb566856
  • =<6.18.*
  • <69f98fff30bdaa72b0cb0e7e078ab6456a0a59b0
  • <a3d85dec60bb0622360fc176b2a51abdbe2ff0ad
  • =<6.12.*
  • <c9a71daaecb2fb1d8c704545cc0b1c920b9bf5d7
  • =<7.1.*
  • <e575dabb805252e3113fdc3f56f6ecacfde422d0
  • ==4.10
  • =<*
  • =<6.1.*
  • =<6.6.*
  • =<5.15.*
  • <7ff42312ccde549f8c698723822c7db35107a39b
  • <4.10
  • <fe997a84a385f840b593ead92e575503a5046cee
  • =<5.10.*
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
staging: rtl8723bs: fix OOB reads in rtw_get_sec_ie(), rtw_get_wapi_ie(), and rtw_get_wps_attr()

In the Linux kernel, the following vulnerability has been resolved: staging: rtl8723bs: fix OOB reads in rtw_get_sec_ie(), rtw_get_wapi_ie(), and rtw_get_wps_attr() Three IE/attribute parsing functions have missing bounds checks. rtw_get_sec_ie() and rtw_get_wapi_ie() iterate over a raw IE buffer without verifying that the header bytes (tag + length) are within the remaining buffer before reading them. Additionally, rtw_get_sec_ie() compares the 4-byte WPA OUI at cnt+2 without checking that at least 6 bytes remain, and rtw_get_wapi_ie() compares a 4-byte WAPI OUI at cnt+6 without checking that at least 10 bytes remain. rtw_get_wps_attr() reads wps_ie[0] and wps_ie+2 unconditionally at entry, before verifying that wps_ielen is large enough to contain the 6-byte WPS IE header (element_id + length + 4-byte OUI). Inside the attribute loop, get_unaligned_be16() is called on attr_ptr and attr_ptr+2 without checking that 4 bytes remain in the buffer. Add a cnt+2 bounds check before each loop body in rtw_get_sec_ie() and rtw_get_wapi_ie(), guard each multi-byte comparison with a minimum IE length requirement, add a wps_ielen < 6 early return in rtw_get_wps_attr(), and add a 4-byte bounds check in its inner loop.

Affected products

Linux
  • <4b51ee8a40fe47864197d73cc02b191de7a6b072
  • =<6.18.*
  • <1463ca3ec6601cbb097d8d87dbf5dcf1cb86a344
  • =<5.15.*
  • =<6.12.*
  • =<7.1.*
  • <efa27d487abcdec79669a60a6d94d5d6eceb7c1d
  • <729c4e72563bda0f1725db1db9ea08df06f41d9b
  • ==4.12
  • =<6.1.*
  • =<6.6.*
  • <b27ecba3196f6c14e3809595ebd69c0c2392512a
  • =<*
  • <6ab1161e539fb7a1c8b35ff5a6ced4702e855b9c
  • <2ea1ce30ead61589214240e8d33d96310fd613e5
  • <4.12
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
iio: light: gp2ap002: fix runtime PM leak on read error

In the Linux kernel, the following vulnerability has been resolved: iio: light: gp2ap002: fix runtime PM leak on read error gp2ap002_read_raw() calls pm_runtime_get_sync() before reading the lux value, but if gp2ap002_get_lux() fails, it returns directly. This skips the pm_runtime_put_autosuspend() call at the "out" label, permanently leaking a runtime PM reference and preventing the device from autosuspending. Replace the direct return with a "goto out" to ensure the reference is properly dropped on the error path.

Affected products

Linux
  • <2ebaea7f3089decb01a8294d89d7e0cf288146c4
  • =<7.1.*
  • =<6.1.*
  • =<5.15.*
  • <62e0d74821a02f0e0c5c79b99ae64dc83a9a90f5
  • =<5.10.*
  • <f350883989ced96d6da7f582f9a6f9c6ffc94e34
  • <0c655d067ac69ee24e2e9d706c54179ea58a43db
  • <5.8
  • <2593f0c6ea37df168975694a3b17e7086f11453e
  • <5.8
  • <7110201c6b21455240c63388f30113f3baafacfc
  • =<6.6.*
  • <38b72267b7e22768a1f26d9935de4e1752a1dc85
  • ==f3e84bf3f86bb3b7bd50666bb8ef7a203a656ca3
  • =<6.18.*
  • =<6.12.*
  • <29137052c4485c74bc2d1b0717f69ca4de14274f
  • ==5.8
  • =<*
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
tcp: restore RCU grace period in tcp_ao_destroy_sock

In the Linux kernel, the following vulnerability has been resolved: tcp: restore RCU grace period in tcp_ao_destroy_sock Commit 51e547e8c89c ("tcp: Free TCP-AO/TCP-MD5 info/keys without RCU") removed the call_rcu() callback from tcp_ao_destroy_sock(), arguing that "the destruction of info/keys is delayed until the socket destructor" and therefore "no one can discover it anymore". That argument does not hold for the call site in tcp_connect() (net/ipv4/tcp_output.c:4327-4332). At that point the socket is in TCP_SYN_SENT, has already been inserted into the inet ehash by inet_hash_connect() in tcp_v4_connect(), and is therefore very much discoverable: any softirq running tcp_v4_rcv() on another CPU can take the socket out of the ehash, walk into tcp_inbound_hash(), and load tp->ao_info via implicit RCU before bh_lock_sock_nested() is taken on the destroying CPU. The reader path then enters __tcp_ao_do_lookup() (net/ipv4/tcp_ao.c:208) which re-loads tp->ao_info via rcu_dereference_check(); the re-load can still observe the (about-to-be-freed) pointer because there is no synchronize_rcu() between rcu_assign_pointer(tp->ao_info, NULL) and tcp_ao_info_free() in tcp_ao_destroy_sock(). The captured pointer is then walked at line 223: hlist_for_each_entry_rcu(key, &ao->head, node, ...) The writer's synchronous kfree() is free to complete between the line 218 re-fetch and the line 223 hlist iteration. The slab is reused (or simply LIST_POISON1-stamped if not yet reused) and the iteration walks attacker-controlled or poison memory in softirq context. Reproducer (no debug shim, stock x86_64 v7.1-rc2 SMP+KASAN, QEMU+KVM): an unprivileged uid=1000 process inside CLONE_NEWUSER|CLONE_NEWNET installs TCP_MD5SIG + TCP_AO_ADD_KEY on a TCP socket, sprays forged TCP-AO segments toward its eventual 4-tuple via raw sockets, then calls connect(). The md5-wins reconciliation in tcp_connect() fires tcp_ao_destroy_sock(); the softirq backlog reader on the loopback NAPI path crashes on the freed ao->head.first walk: Oops: general protection fault, probably for non-canonical address 0xfbd59c000000002f KASAN: maybe wild-memory-access in range [0xdead000000000178-0xdead00000000017f] CPU: 0 UID: 1000 PID: 100 Comm: repro_userns RIP: 0010:__tcp_ao_do_lookup+0x107/0x1c0 Call Trace: <IRQ> __tcp_ao_do_lookup+0x107/0x1c0 tcp_ao_inbound_lookup.constprop.0+0x12a/0x200 tcp_inbound_ao_hash+0x5ea/0x1520 tcp_inbound_hash+0x7ce/0x1240 tcp_v4_rcv+0x1e7a/0x3e10 ... Restore the RCU grace period: re-add struct rcu_head to tcp_ao_info and replace the synchronous tcp_ao_info_free() with a call_rcu() callback. Readers that captured tp->ao_info before rcu_assign_pointer NULLed it now see the object remain valid until rcu_read_unlock(). With the patch applied the reproducer runs cleanly for 2000 iterations on the same kernel build.

Affected products

Linux
  • <6.18
  • <4caf12c778fed3dc3824cf36263be5e2c491fbd0
  • <8bc4d43bccbd60efe85d0a44d5bf41762f2f0c30
  • =<6.18.*
  • ==6.18
  • =<7.1.*
  • =<*
  • <657646c08c94ef7b9dbe468fe7828032216f9841
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
usbip: vudc: fix NULL deref in vep_dequeue()

In the Linux kernel, the following vulnerability has been resolved: usbip: vudc: fix NULL deref in vep_dequeue() vep_alloc_request() wasn't initializing vrequest->udc, so cancellations on the FunctionFS AIO path were arriving in vep_dequeue without a valid UDC reference. Since vrequest->udc is never actually properly used anywhere, we opt to remove it, and update vep_dequeue to obtain a reference to the udc with ep_to_vudc(), consistent with the other vep_ ops. AFAICT this bug has existed for ~10 years. Seems that nobody has really stressed the FunctionFS AIO path on usbip's vudc. I tested this fix in a QEMU aarch64 guest driving FunctionFS endpoints via AIO. Before the fix, running `usbip attach` from the host would cause the guest to oops with the following backtrace: Call trace: vep_dequeue+0x1c/0xe4 (P) usb_ep_dequeue+0x14/0x20 ffs_aio_cancel+0x24/0x34 __arm64_sys_io_cancel+0xb0/0x124 do_el0_svc+0x68/0x100 el0_svc+0x18/0x5c el0t_64_sync_handler+0x98/0xdc el0t_64_sync+0x154/0x158

Affected products

Linux
  • <3750f75f29f99c0223601e2ee73ad084adec47bd
  • <1226293ec9bed3d4cc5b05eeeb811d315ca51652
  • <0025276175fbbe0dcbf3f84d090b0adee769e9d9
  • <347b59e9f96719d89b6ef555d02a18ada1a5846f
  • <4.7
  • <d0ebf9cc7c2ddf95a7cfc654b940bdacb7edde97
  • <c5371e0b91b24159a3ebaa61e70b0980bcf03c0a
  • =<6.18.*
  • =<6.12.*
  • =<7.1.*
  • <9858c91d9ee6a13c45311569039413729fc9b757
  • ==4.7
  • =<6.1.*
  • =<*
  • =<6.6.*
  • =<5.15.*
  • <0443e4416aa1ee97748d1ed904eaf3352c60045e
  • =<5.10.*
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
usb: dwc3: run gadget disconnect from sleepable suspend context

In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: run gadget disconnect from sleepable suspend context dwc3_gadget_suspend() takes dwc->lock with IRQs disabled and then calls dwc3_disconnect_gadget(). For async callbacks that helper only uses plain spin_unlock()/spin_lock(), so the gadget ->disconnect() callback still runs with IRQs disabled and any sleepable callback trips Lockdep. This issue was found by our static analysis tool and then manually reviewed against the current tree. The grounded PoC kept the dwc3_gadget_suspend() -> dwc3_disconnect_gadget() -> gadget_driver->disconnect() chain, and Lockdep reported: BUG: sleeping function called from invalid context gadget_disconnect+0x21/0x39 [vuln_msv] dwc3_gadget_suspend.constprop.0+0x2b/0x42 [vuln_msv] Keep the disconnect callback selection in one common helper, but add a sleepable suspend-side wrapper which snapshots the callback under dwc->lock and then runs it after spin_unlock_irqrestore(). The regular event path still uses the existing spin_unlock()/spin_lock() window.

Affected products

Linux
  • ==06684c72b6b153dc434bb6ccebbb49f4cd812b5e
  • =<7.1.*
  • =<6.1.*
  • =<5.15.*
  • <5.15.212
  • ==6.4
  • <48958478cb8dbc429a5b19f36e866b63d6297d1d
  • <6.4
  • <5e5798880eb1533a7de6fb68eb14b2d8202ebf76
  • <642e04f5c292d04070ae6e4374fbf14cc40a2465
  • <6.4
  • <b399be2958456efe1b64b19c55a54a24e9035769
  • =<6.6.*
  • <e0e4f15d4225fb7156cc0e3c21eb8953114f9b89
  • <6.1.178
  • =<6.18.*
  • <010382937fb69892b3469ac4d30af072262f59e8
  • <c4e232bd07fe2b69a6e5c380db41dd36b95e0524
  • =<6.12.*
  • =<*
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
HID: hid-goodix-spi: validate report size to prevent stack buffer overflow

In the Linux kernel, the following vulnerability has been resolved: HID: hid-goodix-spi: validate report size to prevent stack buffer overflow goodix_hid_set_raw_report() builds a protocol frame in a 128-byte stack buffer (tmp_buf), writing an 11-12 byte header followed by the caller-supplied report data. The HID core caps report size at HID_MAX_BUFFER_SIZE (16384) by default, while the driver does not set hid_ll_driver.max_buffer_size and performs no bounds checking before copying the payload: memcpy(tmp_buf + tx_len, buf, len); A hidraw SET_REPORT ioctl with a report larger than ~116 bytes overflows the stack buffer. Add a size check after constructing the header, rejecting reports that would exceed the buffer capacity. Discovered by Atuin - Automated Vulnerability Discovery Engine.

Affected products

Linux
  • <dae1d000ddfd5c2140b036e47fff0c497ae9c64b
  • ==6.12
  • =<6.18.*
  • <835fcc8655569737e3f057d42875a96259db74c2
  • <ad47ad624f2fce0bc44bbadb664242461a97d774
  • <6.12
  • =<6.12.*
  • =<7.1.*
  • =<*
  • <db0a0768d09273aadadeb76730cd658d720333a4
Dismissed
(max. allowed matches exceeded)
created 16 hours ago Activity log
  • Created & dismissed (max. allowed matches exceeded) suggestion
Bluetooth: btnxpuart: Fix out-of-bounds firmware read in nxp_recv_fw_req_v3()

In the Linux kernel, the following vulnerability has been resolved: Bluetooth: btnxpuart: Fix out-of-bounds firmware read in nxp_recv_fw_req_v3() During the v3 firmware download the controller sends a v3_data_req with a 32 bit offset and a 16 bit len. nxp_recv_fw_req_v3() checks only the lower bound of the offset and then sends firmware from that offset. nxpdev->fw_dnld_v3_offset = offset - nxpdev->fw_v3_offset_correction; serdev_device_write_buf(nxpdev->serdev, nxpdev->fw->data + nxpdev->fw_dnld_v3_offset, len); Nothing checks that fw_dnld_v3_offset + len stays within nxpdev->fw->size, so a controller that asks for an offset or length past the firmware image makes the driver read past the end of nxpdev->fw->data and send that memory back over UART. nxp_recv_fw_req_v1() already bounds the same write. Add the equivalent check to the v3 path, reject the request when it falls outside the firmware image, and zero len on the error path so the fw_v3_prev_sent bookkeeping at free_skb stays consistent.

Affected products

Linux
  • <21e60eb4d95854196e7c0e77383f35e7ac95df61
  • =<6.18.*
  • ==6.4
  • =<6.12.*
  • <6.4
  • =<7.1.*
  • =<*
  • =<6.6.*
  • <2a68a773089204af1c8581dc79668b775418c5ee
  • <441088792ffec3ca01f4efe2934060570eb11eb8
  • <49bcb39e3a041ce26021f77971eaccb49a275118
  • <badff6c3bed8923a1257a853f137d447976eec30