Skip to content
OpenAdvisories

Weakness (CWE)

CWE-667: Improper Locking

Class Draft

The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors.

How to prevent it (1 mitigation)
  1. Implementation

    Use industry standard APIs to implement locking mechanism.

Source: MITRE CWE-667

121 results · Clear filters · Feed

  • Medium 5.5

    ptdma: pt_core_execute_cmd() should use spinlock

    In the Linux kernel, the following vulnerability has been resolved: ptdma: pt_core_execute_cmd() should use spinlock The interrupt handler (pt_core_irq_handler()) of the ptdma driver can be called from interrupt context. The code flow in this function can lea…

  • Medium 5.5

    VMCI: Use threaded irqs instead of tasklets

    In the Linux kernel, the following vulnerability has been resolved: VMCI: Use threaded irqs instead of tasklets The vmci_dispatch_dgs() tasklet function calls vmci_read_data() which uses wait_event() resulting in invalid sleep in an atomic context (and theref…

  • Medium 5.5

    f2fs: initialize locks earlier in f2fs_fill_super()

    In the Linux kernel, the following vulnerability has been resolved: f2fs: initialize locks earlier in f2fs_fill_super() syzbot is reporting lockdep warning at f2fs_handle_error() [1], for spin_lock(&sbi->error_lock) is called before spin_lock_init() is called…

  • Medium 5.5

    mm/swapfile: add cond_resched() in get_swap_pages()

    In the Linux kernel, the following vulnerability has been resolved: mm/swapfile: add cond_resched() in get_swap_pages() The softlockup still occurs in get_swap_pages() under memory pressure. 64 CPU cores, 64GB memory, and 28 zram devices, the disksize of each…

  • Medium 5.5

    USB: gadget: f_midi: f_midi_complete to call queue_work

    In the Linux kernel, the following vulnerability has been resolved: USB: gadget: f_midi: f_midi_complete to call queue_work When using USB MIDI, a lock is attempted to be acquired twice through a re-entrant call to f_midi_transmit, causing a deadlock. Fix it …

  • Medium 5.5

    drm/i915/gt: Use spin_lock_irqsave() in interruptible context

    In the Linux kernel, the following vulnerability has been resolved: drm/i915/gt: Use spin_lock_irqsave() in interruptible context spin_lock/unlock() functions used in interrupt contexts could result in a deadlock, as seen in GitLab issue #13399, which occurs …

  • Medium 5.5

    bpf: Fix deadlock when freeing cgroup storage

    In the Linux kernel, the following vulnerability has been resolved: bpf: Fix deadlock when freeing cgroup storage The following commit bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") first introduced deadlock prevention for…

  • Medium 5.5

    team: prevent adding a device which is already a team device lower

    In the Linux kernel, the following vulnerability has been resolved: team: prevent adding a device which is already a team device lower Prevent adding a device which is already a team device lower, e.g. adding veth0 if vlan1 was already added and veth0 is a lo…

  • Medium 5.5

    media: uvcvideo: Fix deadlock during uvc_probe

    In the Linux kernel, the following vulnerability has been resolved: media: uvcvideo: Fix deadlock during uvc_probe If uvc_probe() fails, it can end up calling uvc_status_unregister() before uvc_status_init() is called. Fix this by checking if dev->status is N…

  • Medium 5.5

    rhashtable: Fix potential deadlock by moving schedule_work outside lock

    In the Linux kernel, the following vulnerability has been resolved: rhashtable: Fix potential deadlock by moving schedule_work outside lock Move the hash table growth check and work scheduling outside the rht lock to prevent a possible circular locking depend…

  • Medium 5.5

    btrfs: fix deadlock between concurrent dio writes when low on free data space

    In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock between concurrent dio writes when low on free data space When reserving data space for a direct IO write we can end up deadlocking if we have multiple tasks attempting a …

  • Medium 5.5

    scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg()

    In the Linux kernel, the following vulnerability has been resolved: scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg() In an attempt to log message 0126 with LOG_TRACE_EVENT, the following hard lockup call trace hangs the system. Call Trace:…

  • Medium 5.5

    scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock

    In the Linux kernel, the following vulnerability has been resolved: scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock During stress I/O tests with 500+ vports, hard LOCKUP call traces are observed. CPU A: native_queued_spin_lock_slowpath+0x192 _r…

  • Medium 5.5

    media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko

    In the Linux kernel, the following vulnerability has been resolved: media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko If the driver support subdev mode, the parameter "dev->pm.dev" will be NULL in mtk_vcodec_dec_remove. Kernel will cr…

  • Medium 5.5

    nvdimm: Fix firmware activation deadlock scenarios

    In the Linux kernel, the following vulnerability has been resolved: nvdimm: Fix firmware activation deadlock scenarios Lockdep reports the following deadlock scenarios for CXL root device power-management, device_prepare(), operations, and device_shutdown() o…

  • Medium 5.5

    tty: fix deadlock caused by calling printk() under tty_port->lock

    In the Linux kernel, the following vulnerability has been resolved: tty: fix deadlock caused by calling printk() under tty_port->lock pty_write() invokes kmalloc() which may invoke a normal printk() to print failure message. This can cause a deadlock in the s…

  • Medium 5.5

    block: Fix potential deadlock in blk_ia_range_sysfs_show()

    In the Linux kernel, the following vulnerability has been resolved: block: Fix potential deadlock in blk_ia_range_sysfs_show() When being read, a sysfs attribute is already protected against removal with the kobject node active reference counter. As a result,…

  • Medium 5.5

    driver core: fix deadlock in __device_attach

    In the Linux kernel, the following vulnerability has been resolved: driver core: fix deadlock in __device_attach In __device_attach function, The lock holding logic is as follows: ... __device_attach device_lock(dev) // get lock dev async_schedule_dev(__devic…

  • Medium 5.5

    bcache: avoid journal no-space deadlock by reserving 1 journal bucket

    In the Linux kernel, the following vulnerability has been resolved: bcache: avoid journal no-space deadlock by reserving 1 journal bucket The journal no-space deadlock was reported time to time. Such deadlock can happen in the following situation. When all jo…

  • Medium 5.5

    tracing: Fix sleeping function called from invalid context on RT kernel

    In the Linux kernel, the following vulnerability has been resolved: tracing: Fix sleeping function called from invalid context on RT kernel When setting bootparams="trace_event=initcall:initcall_start tp_printk=1" in the cmdline, the output_printk() was calle…

  • Medium 5.5

    drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()

    In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() There is a deadlock in rtllib_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | rtllib_send_beacon() rtllib_bea…

  • Medium 5.5

    NFSv4: Don't hold the layoutget locks across multiple RPC calls

    In the Linux kernel, the following vulnerability has been resolved: NFSv4: Don't hold the layoutget locks across multiple RPC calls When doing layoutget as part of the open() compound, we have to be careful to release the layout locks before we can call any f…

  • Medium 5.5

    drivers: usb: host: Fix deadlock in oxu_bus_suspend()

    In the Linux kernel, the following vulnerability has been resolved: drivers: usb: host: Fix deadlock in oxu_bus_suspend() There is a deadlock in oxu_bus_suspend(), which is shown below: (Thread 1) | (Thread 2) | timer_action() oxu_bus_suspend() | mod_timer() …

  • Medium 5.5

    drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()

    In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle() There is a deadlock in rtw_joinbss_event_prehandle(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() r…

  • Medium 5.5

    drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()

    In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop() There is a deadlock in ieee80211_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | ieee80211_send_beacon() i…

  • Medium 5.5

    drivers: tty: serial: Fix deadlock in sa1100_set_termios()

    In the Linux kernel, the following vulnerability has been resolved: drivers: tty: serial: Fix deadlock in sa1100_set_termios() There is a deadlock in sa1100_set_termios(), which is shown below: (Thread 1) | (Thread 2) | sa1100_enable_ms() sa1100_set_termios()…

  • Medium 5.5

    drivers: staging: rtl8192eu: Fix deadlock in rtw_joinbss_event_prehandle

    In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192eu: Fix deadlock in rtw_joinbss_event_prehandle There is a deadlock in rtw_joinbss_event_prehandle(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw…

  • Medium 5.5

    ceph: fix possible deadlock when holding Fwb to get inline_data

    In the Linux kernel, the following vulnerability has been resolved: ceph: fix possible deadlock when holding Fwb to get inline_data 1, mount with wsync. 2, create a file with O_RDWR, and the request was sent to mds.0: ceph_atomic_open()--> ceph_mdsc_do_reques…

  • Medium 5.5

    ath11k: Fix frames flush failure caused by deadlock

    In the Linux kernel, the following vulnerability has been resolved: ath11k: Fix frames flush failure caused by deadlock We are seeing below warnings: kernel: [25393.301506] ath11k_pci 0000:01:00.0: failed to flush mgmt transmit queue 0 kernel: [25398.421509] …

  • Medium 5.5

    ubifs: Fix deadlock in concurrent rename whiteout and inode writeback

    In the Linux kernel, the following vulnerability has been resolved: ubifs: Fix deadlock in concurrent rename whiteout and inode writeback Following hung tasks: [ 77.028764] task:kworker/u8:4 state:D stack: 0 pid: 132 [ 77.028820] Call Trace: [ 77.029027] sche…

  • Medium 5.5

    powerpc/set_memory: Avoid spinlock recursion in change_page_attr()

    In the Linux kernel, the following vulnerability has been resolved: powerpc/set_memory: Avoid spinlock recursion in change_page_attr() Commit 1f9ad21c3b38 ("powerpc/mm: Implement set_memory() routines") included a spin_lock() to change_page_attr() in order to…

  • Medium 5.5

    irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity()

    In the Linux kernel, the following vulnerability has been resolved: irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity() The following call-chain leads to enabling interrupts in a nested interrupt disabled section: irq_set_vcpu_affinity(…

  • Medium 5.5

    net/mlx5e: Fix inversion dependency warning while enabling IPsec tunnel

    In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Fix inversion dependency warning while enabling IPsec tunnel Attempt to enable IPsec packet offload in tunnel mode in debug kernel generates the following kernel panic, which is ha…

  • Medium 5.5

    afs: Fix merge preference rule failure condition

    In the Linux kernel, the following vulnerability has been resolved: afs: Fix merge preference rule failure condition syzbot reported a lock held when returning to userspace[1]. This is because if argc is less than 0 and the function returns directly, the held…

  • Medium 5.5

    virtio-blk: don't keep queue frozen during system suspend

    In the Linux kernel, the following vulnerability has been resolved: virtio-blk: don't keep queue frozen during system suspend Commit 4ce6e2db00de ("virtio-blk: Ensure no requests in virtqueues before deleting vqs.") replaces queue quiesce with queue freeze in…

  • Medium 5.5

    cgroup/cpuset: remove kernfs active break

    In the Linux kernel, the following vulnerability has been resolved: cgroup/cpuset: remove kernfs active break A warning was found: WARNING: CPU: 10 PID: 3486953 at fs/kernfs/file.c:828 CPU: 10 PID: 3486953 Comm: rmdir Kdump: loaded Tainted: G RIP: 0010:kernfs…

  • Medium 5.5

    scsi: megaraid_sas: Fix for a potential deadlock

    In the Linux kernel, the following vulnerability has been resolved: scsi: megaraid_sas: Fix for a potential deadlock This fixes a 'possible circular locking dependency detected' warning CPU0 CPU1 ---- ---- lock(&instance->reset_mutex); lock(&shost->scan_mutex…

  • Medium 5.5

    block: Prevent potential deadlocks in zone write plug error recovery

    In the Linux kernel, the following vulnerability has been resolved: block: Prevent potential deadlocks in zone write plug error recovery Zone write plugging for handling writes to zones of a zoned block device always execute a zone report whenever a write BIO…

  • Medium 5.5

    netfilter: IDLETIMER: Fix for possible ABBA deadlock

    In the Linux kernel, the following vulnerability has been resolved: netfilter: IDLETIMER: Fix for possible ABBA deadlock Deletion of the last rule referencing a given idletimer may happen at the same time as a read of its file in sysfs: | ====================…

  • Medium 5.5

    Bluetooth: iso: Fix circular lock in iso_listen_bis

    In the Linux kernel, the following vulnerability has been resolved: Bluetooth: iso: Fix circular lock in iso_listen_bis This fixes the circular locking dependency warning below, by releasing the socket lock before enterning iso_listen_bis, to avoid any potent…