Vulnerability · Published Dec 9, 2025 · Assigned by Linux

CVE-2022-50661seccomp: Move copy_seccomp() to no failure path.

Unrated

In plain English

A security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS )–Not rated
Exploit odds (30 days)0.2%top 84.3% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: seccomp: Move copy_seccomp() to no failure path. Our syzbot instance reported memory leaks in do_seccomp() [0], similar to the report [1]. It shows that we miss freeing struct seccomp_filter and some objects included in it. We can reproduce the issue with the program below [2] which calls one seccomp() and two clone() syscalls. The first clone()d child exits earlier than its parent and sends a signal to kill it during the second clone(), more precisely before the fatal_signal_pending() test in copy_process(). When the parent receives the signal, it has to destroy the embryonic process and return -EINTR to user space. In the failure path, we have to call seccomp_filter_release() to decrement the filter's refcount. Initially, we called it in free_task() called from the failure path, but the commit 3a15fb6ed92c ("seccomp: release filter after task is fully dead") moved it to release_task() to notify user space as early as possible that the filter is no longer used. To keep the change and current seccomp refcount semantics, let's move copy_seccomp() just after the signal check and add a WARN_ON_ONCE() in free_task() for future debugging. [0]: unreferenced object 0xffff8880063add00 (size 256): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.914s) hex dump (first 32 bytes): 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace: do_seccomp (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/seccomp.c:666 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) unreferenced object 0xffffc90000035000 (size 4096): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: __vmalloc_node_range (mm/vmalloc.c:3226) __vmalloc_node (mm/vmalloc.c:3261 (discriminator 4)) bpf_prog_alloc_no_stats (kernel/bpf/core.c:91) bpf_prog_alloc (kernel/bpf/core.c:129) bpf_prog_create_from_user (net/core/filter.c:1414) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) unreferenced object 0xffff888003fa1000 (size 1024): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: bpf_prog_alloc_no_stats (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/bpf/core.c:95) bpf_prog_alloc (kernel/bpf/core.c:129) bpf_prog_create_from_user (net/core/filter.c:1414) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) unreferenced object 0xffff888006360240 (size 16): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 16 bytes): 01 00 37 00 76 65 72 6c e0 83 01 06 80 88 ff ff ..7.verl........ backtrace: bpf_prog_store_orig_filter (net/core/filter.c:1137) bpf_prog_create_from_user (net/core/filter.c:1428) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) unreferenced object 0xffff888 ---truncated---

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.4-1DEBIAN-CVE-2022-50661
Debian:13linux6.1.4-1DEBIAN-CVE-2022-50661
Debian:14linux6.1.4-1DEBIAN-CVE-2022-50661
Ubuntu:22.04:LTSlinux5.15.0-69.76UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-aws5.15.0-1033.37UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure5.15.0-1035.42UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1035.42.1UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gcp5.15.0-1031.38UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gke5.15.0-1030.35UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1017.22UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-ibm5.15.0-1027.30UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1027.32UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-kvm5.15.0-1030.35UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-69.76UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1023.23UBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oracle5.15.0-1032.38UBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-raspi5.15.0-1026.28UBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2022-50661
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2022-50661

Affected products (as reported)

VendorProductVersions
Linux Linux 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 – before d4a895e924b486f2a38463114509e1088ef4d7f53a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 – before a31a647a3d1073a642c5bbe3457731fb353cb9803a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 – before 29a69fa075d0577eff1137426669de21187ec1823a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 – before 5b81f0c6c60e35bf8153230ddfb03ebb14e179863a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 – before a1140cb215fa13dcec06d12ba0c3ee105633b7c4
Linux Linux 5.9

References