# CVE-2022-50661: seccomp: Move copy\_seccomp() to no failure path.

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-09T01:29:09.498Z
- **Modified:** 2026-11-10T12:10:00.177Z

## Who should check

- Anyone running Linux \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< d4a895e924b486f2a38463114509e1088ef4d7f5; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a31a647a3d1073a642c5bbe3457731fb353cb980; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 29a69fa075d0577eff1137426669de21187ec182; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 5b81f0c6c60e35bf8153230ddfb03ebb14e17986; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a1140cb215fa13dcec06d12ba0c3ee105633b7c4
- Anyone running Linux 5.9

## 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 and fixed versions

- Linux: \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< d4a895e924b486f2a38463114509e1088ef4d7f5; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a31a647a3d1073a642c5bbe3457731fb353cb980; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 29a69fa075d0577eff1137426669de21187ec182; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 5b81f0c6c60e35bf8153230ddfb03ebb14e17986; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a1140cb215fa13dcec06d12ba0c3ee105633b7c4 (cvelist)
- Linux: 5.9 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50661. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50661.md
Affected: Linux >= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, < d4a895e924b486f2a38463114509e1088ef4d7f5; >= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, < a31a647a3d1073a642c5bbe3457731fb353cb980; >= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, < 29a69fa075d0577eff1137426669de21187ec182; >= 3a15fb6ed92cb32b0a83f40…
Fixed in: Linux 29a69fa075d0577eff1137426669de21187ec182, Linux 5b81f0c6c60e35bf8153230ddfb03ebb14e17986

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50661 being exploited?

There is no confirmed exploitation: CVE-2022-50661 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50661?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50661?

Linux \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< d4a895e924b486f2a38463114509e1088ef4d7f5; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a31a647a3d1073a642c5bbe3457731fb353cb980; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 29a69fa075d0577eff1137426669de21187ec182; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< 5b81f0c6c60e35bf8153230ddfb03ebb14e17986; \>= 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3, \< a1140cb215fa13dcec06d12ba0c3ee105633b7c4; Linux 5.9.

### Is there a fix for CVE-2022-50661?

Yes. Fixed in Linux 29a69fa075d0577eff1137426669de21187ec182, Linux 5b81f0c6c60e35bf8153230ddfb03ebb14e17986. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50661?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/d4a895e924b486f2a38463114509e1088ef4d7f5>
- other: <https://git.kernel.org/stable/c/a31a647a3d1073a642c5bbe3457731fb353cb980>
- other: <https://git.kernel.org/stable/c/29a69fa075d0577eff1137426669de21187ec182>
- other: <https://git.kernel.org/stable/c/5b81f0c6c60e35bf8153230ddfb03ebb14e17986>
- other: <https://git.kernel.org/stable/c/a1140cb215fa13dcec06d12ba0c3ee105633b7c4>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50661>

HTML: <https://flawdb.com/CVE-2022-50661> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50661>
