CVE-2022-49803

netdevsim: Fix memory leak of nsim_dev->fa_cookie

MEDIUM
5.5
CVSS Score
Published: May 1, 2025 at 02:09 PM UTC
Updated: July 4, 2026 at 12:24 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: netdevsim: Fix memory leak of nsim_dev->fa_cookie kmemleak reports this issue: unreferenced object 0xffff8881bac872d0 (size 8): comm "sh", pid 58603, jiffies 4481524462 (age 68.065s) hex dump (first 8 bytes): 04 00 00 00 de ad be ef ........ backtrace: [<00000000c80b8577>] __kmalloc+0x49/0x150 [<000000005292b8c6>] nsim_dev_trap_fa_cookie_write+0xc1/0x210 [netdevsim] [<0000000093d78e77>] full_proxy_write+0xf3/0x180 [<000000005a662c16>] vfs_write+0x1c5/0xaf0 [<000000007aabf84a>] ksys_write+0xed/0x1c0 [<000000005f1d2e47>] do_syscall_64+0x3b/0x90 [<000000006001c6ec>] entry_SYSCALL_64_after_hwframe+0x63/0xcd The issue occurs in the following scenarios: nsim_dev_trap_fa_cookie_write() kmalloc() fa_cookie nsim_dev->fa_cookie = fa_cookie .. nsim_drv_remove() The fa_cookie allocked in nsim_dev_trap_fa_cookie_write() is not freed. To fix, add kfree(nsim_dev->fa_cookie) to nsim_drv_remove().

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.7 ≤ v < 5.10.2605.7 ≤ v < 5.15.2095.7 ≤ v < 6.0.105.7 ≤ v < 6.16.1 rc16.1 rc26.1 rc36.1 rc46.1 rc5d3cbb907ae57fe5da314b51d949b617b538bdeae
Vendor states this is fixed in 064bc7312bd09a48798418663090be0c776183db (fixed)
Vendor states this is fixed in 207edad5717e0a5709ce8467f0eff41c607835c9 (fixed)
Vendor states this is fixed in 6d463ddd0107d4188229d996dcdd45c99bad8af7 (fixed)
Vendor states this is fixed in 7d79725a7073d86b9185f87718e22f3d65115801 (fixed)
Vendor states this is fixed in 5.10.260 (unaffected)
Vendor states this is fixed in 5.15.209 (unaffected)
Vendor states this is fixed in 5.7 (unaffected)
Vendor states this is fixed in 6.0.10 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card