CVE-2022-50396

CVE-2022-50396 is a medium-severity security vulnerability. No fixed version is listed yet.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

In the Linux kernel, the following vulnerability has been resolved: net: sched: fix memory leak...

In the Linux kernel, the following vulnerability has been resolved:

net: sched: fix memory leak in tcindex_set_parms

Syzkaller reports a memory leak as follows:

BUG: memory leak
unreferenced object 0xffff88810c287f00 (size 256):
comm "syz-executor105", pid 3600, jiffies 4294943292 (age 12.990s)
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:
[] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
[] kmalloc include/linux/slab.h:576 [inline]
[] kmalloc_array include/linux/slab.h:627 [inline]
[] kcalloc include/linux/slab.h:659 [inline]
[] tcf_exts_init include/net/pkt_cls.h:250 [inline]
[] tcindex_set_parms+0xa7/0xbe0 net/sched/cls_tcindex.c:342
[] tcindex_change+0xdf/0x120 net/sched/cls_tcindex.c:553
[] tc_new_tfilter+0x4f2/0x1100 net/sched/cls_api.c:2147
[] rtnetlink_rcv_msg+0x4dc/0x5d0 net/core/rtnetlink.c:6082
[] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2540
[] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
[] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345
[] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921
[] sock_sendmsg_nosec net/socket.c:714 [inline]
[] sock_sendmsg+0x56/0x80 net/socket.c:734
[] ____sys_sendmsg+0x178/0x410 net/socket.c:2482
[] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536
[] __sys_sendmmsg+0x105/0x330 net/socket.c:2622
[] __do_sys_sendmmsg net/socket.c:2651 [inline]
[] __se_sys_sendmmsg net/socket.c:2648 [inline]
[] __x64_sys_sendmmsg+0x24/0x30 net/socket.c:2648
[] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[] entry_SYSCALL_64_after_hwframe+0x63/0xcd
====================================

Kernel uses tcindex_change() to change an existing
filter properties.

Yet the problem is that, during the process of changing,
if old_r is retrieved from p->perfect, then
kernel uses tcindex_alloc_perfect_hash() to newly
allocate filter results, uses tcindex_filter_result_init()
to clear the old filter result, without destroying
its tcf_exts structure, which triggers the above memory leak.

To be more specific, there are only two source for the old_r,
according to the tcindex_lookup(). old_r is retrieved from
p->perfect, or old_r is retrieved from p->h.

  • If old_r is retrieved from p->perfect, kernel uses
    tcindex_alloc_perfect_hash() to newly allocate the
    filter results. Then r is assigned with cp->perfect + handle,
    which is newly allocated. So condition old_r && old_r != r is
    true in this situation, and kernel uses tcindex_filter_result_init()
    to clear the old filter result, without destroying
    its tcf_exts structure

  • If old_r is retrieved from p->h, then p->perfect is NULL
    according to the tcindex_lookup(). Considering that cp->h
    is directly copied from p->h and p->perfect is NULL,
    r is assigned with tcindex_lookup(cp, handle), whose value
    should be the same as old_r, so condition old_r && old_r != r
    is false in this situation, kernel ignores using
    tcindex_filter_result_init() to clear the old filter result.

So only when old_r is retrieved from p->perfect does kernel use
tcindex_filter_result_init() to clear the old filter result, which
triggers the above memory leak.

Considering that there already exists a tc_filter_wq workqueue
to destroy the old tcindex_d
---truncated---

Impact

CVE-2022-50396 has a CVSS score of 5.5 (Medium). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. No fixed version is listed yet, so configuration controls and monitoring matter more in the interim.

Affected versions

Not available

Security releases

Not available

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Not available

Frequently Asked Questions

  1. What is CVE-2022-50396? CVE-2022-50396 is a medium-severity security vulnerability. No fixed version is listed yet.
  2. How severe is CVE-2022-50396? CVE-2022-50396 has a CVSS score of 5.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Is there a fix for CVE-2022-50396? No fixed version is listed for CVE-2022-50396 yet. Monitor the advisory for updates and apply mitigations in the interim.
  4. Is CVE-2022-50396 exploitable, and should I be worried? Whether CVE-2022-50396 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2022-50396 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

Stop the waste.
Protect your environment with Kodem.