# CVE-2022-49796: tracing: kprobe: Fix potential null-ptr-deref on trace\_array in kprobe\_event\_gen\_test\_exit()

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-05-01T14:09:26.392Z
- **Modified:** 2026-06-17T05:19:10.120Z

## Who should check

- Anyone running Linux \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 28a54854a95923b6266a9479ad660ca2cc0e1d5f; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e57daa750369fedbf678346aec724a43b9a51749; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 510c12f93674ea0a1423b24f36c67357168a262a; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 22ea4ca9631eb137e64e5ab899e9c89cb6670959
- Anyone running Linux 5.6

## Description

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

tracing: kprobe: Fix potential null-ptr-deref on trace\_array in kprobe\_event\_gen\_test\_exit()

When test\_gen\_kprobe\_cmd() failed after kprobe\_event\_gen\_cmd\_end(), it
will goto delete, which will call kprobe\_event\_delete() and release the
corresponding resource. However, the trace\_array in gen\_kretprobe\_test
will point to the invalid resource. Set gen\_kretprobe\_test to NULL
after called kprobe\_event\_delete() to prevent null-ptr-deref.

BUG: kernel NULL pointer dereference, address: 0000000000000070
PGD 0 P4D 0
Oops: 0000 \[\#1\] SMP PTI
CPU: 0 PID: 246 Comm: modprobe Tainted: G        W
6.1.0-rc1-00174-g9522dc5c87da-dirty \#248
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
RIP: 0010:\_\_ftrace\_set\_clr\_event\_nolock+0x53/0x1b0
Code: e8 82 26 fc ff 49 8b 1e c7 44 24 0c ea ff ff ff 49 39 de 0f 84 3c
01 00 00 c7 44 24 18 00 00 00 00 e8 61 26 fc ff 48 8b 6b 10 \<44\> 8b 65
70 4c 8b 6d 18 41 f7 c4 00 02 00 00 75 2f
RSP: 0018:ffffc9000159fe00 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88810971d268 RCX: 0000000000000000
RDX: ffff8881080be600 RSI: ffffffff811b48ff RDI: ffff88810971d058
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: ffffc9000159fe58 R11: 0000000000000001 R12: ffffffffa0001064
R13: ffffffffa000106c R14: ffff88810971d238 R15: 0000000000000000
FS:  00007f89eeff6540(0000) GS:ffff88813b600000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000070 CR3: 000000010599e004 CR4: 0000000000330ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 \<TASK\>
 \_\_ftrace\_set\_clr\_event+0x3e/0x60
 trace\_array\_set\_clr\_event+0x35/0x50
 ? 0xffffffffa0000000
 kprobe\_event\_gen\_test\_exit+0xcd/0x10b \[kprobe\_event\_gen\_test\]
 \_\_x64\_sys\_delete\_module+0x206/0x380
 ? lockdep\_hardirqs\_on\_prepare+0xd8/0x190
 ? syscall\_enter\_from\_user\_mode+0x1c/0x50
 do\_syscall\_64+0x3f/0x90
 entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
RIP: 0033:0x7f89eeb061b7

## Affected and fixed versions

- Linux: \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 28a54854a95923b6266a9479ad660ca2cc0e1d5f; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e57daa750369fedbf678346aec724a43b9a51749; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 510c12f93674ea0a1423b24f36c67357168a262a; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 22ea4ca9631eb137e64e5ab899e9c89cb6670959 (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

- Upgrade Linux to 22ea4ca9631eb137e64e5ab899e9c89cb6670959 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49796.md
Affected: Linux >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < 28a54854a95923b6266a9479ad660ca2cc0e1d5f; >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < e57daa750369fedbf678346aec724a43b9a51749; >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < 510c12f93674ea0a1423b24f36c67357168a262a; >= 64836248dda20c8e7427b49…
Fixed in: Linux 28a54854a95923b6266a9479ad660ca2cc0e1d5f, Linux 510c12f93674ea0a1423b24f36c67357168a262a, Linux 22ea4ca9631eb137e64e5ab899e9c89cb6670959

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-49796 being exploited?

There is no confirmed exploitation: CVE-2022-49796 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-49796?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 28a54854a95923b6266a9479ad660ca2cc0e1d5f; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e57daa750369fedbf678346aec724a43b9a51749; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 510c12f93674ea0a1423b24f36c67357168a262a; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 22ea4ca9631eb137e64e5ab899e9c89cb6670959; Linux 5.6.

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

Yes. Fixed in Linux 28a54854a95923b6266a9479ad660ca2cc0e1d5f, Linux 510c12f93674ea0a1423b24f36c67357168a262a, Linux 22ea4ca9631eb137e64e5ab899e9c89cb6670959. Upgrade Linux to 22ea4ca9631eb137e64e5ab899e9c89cb6670959 or later.

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

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

- patch: <https://git.kernel.org/stable/c/28a54854a95923b6266a9479ad660ca2cc0e1d5f>
- patch: <https://git.kernel.org/stable/c/e57daa750369fedbf678346aec724a43b9a51749>
- patch: <https://git.kernel.org/stable/c/510c12f93674ea0a1423b24f36c67357168a262a>
- patch: <https://git.kernel.org/stable/c/22ea4ca9631eb137e64e5ab899e9c89cb6670959>

## 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-49796>

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