# CVE-2022-49797: tracing: kprobe: Fix potential null-ptr-deref on trace\_event\_file 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 14, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-05-01T14:09:26.998Z
- **Modified:** 2026-11-05T20:17:12.063Z

## Who should check

- Anyone running Linux \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< bb70fcae4115d24b7e8cee17a6da8b1943f546bb; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< fd0efd4f7bfe611a8339ba01bc2ac3c33e79159d; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e0d75267f59d7084e0468bd68beeb1bf9c71d7c0
- 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\_event\_file in kprobe\_event\_gen\_test\_exit()

When trace\_get\_event\_file() failed, gen\_kretprobe\_test will be assigned
as the error code. If module kprobe\_event\_gen\_test is removed now, the
null pointer dereference will happen in kprobe\_event\_gen\_test\_exit().
Check if gen\_kprobe\_test or gen\_kretprobe\_test is error code or NULL
before dereference them.

BUG: kernel NULL pointer dereference, address: 0000000000000012
PGD 0 P4D 0
Oops: 0000 \[\#1\] SMP PTI
CPU: 3 PID: 2210 Comm: modprobe Not tainted
6.1.0-rc1-00171-g2159299a3b74-dirty \#217
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
RIP: 0010:kprobe\_event\_gen\_test\_exit+0x1c/0xb5 \[kprobe\_event\_gen\_test\]
Code: Unable to access opcode bytes at 0xffffffff9ffffff2.
RSP: 0018:ffffc900015bfeb8 EFLAGS: 00010246
RAX: ffffffffffffffea RBX: ffffffffa0002080 RCX: 0000000000000000
RDX: ffffffffa0001054 RSI: ffffffffa0001064 RDI: ffffffffdfc6349c
RBP: ffffffffa0000000 R08: 0000000000000004 R09: 00000000001e95c0
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000800
R13: ffffffffa0002420 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f56b75be540(0000) GS:ffff88813bc00000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff9ffffff2 CR3: 000000010874a006 CR4: 0000000000330ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 \<TASK\>
 \_\_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

## Affected and fixed versions

- Linux: \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< bb70fcae4115d24b7e8cee17a6da8b1943f546bb; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< fd0efd4f7bfe611a8339ba01bc2ac3c33e79159d; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e0d75267f59d7084e0468bd68beeb1bf9c71d7c0 (cvelist)
- Linux: 5.6 (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-49797. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49797.md
Affected: Linux >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < bb70fcae4115d24b7e8cee17a6da8b1943f546bb; >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332; >= 64836248dda20c8e7427b493f7e06d9bf8f58850, < fd0efd4f7bfe611a8339ba01bc2ac3c33e79159d; >= 64836248dda20c8e7427b49…
Fixed in: Linux 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332

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

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

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

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

Linux \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< bb70fcae4115d24b7e8cee17a6da8b1943f546bb; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< fd0efd4f7bfe611a8339ba01bc2ac3c33e79159d; \>= 64836248dda20c8e7427b493f7e06d9bf8f58850, \< e0d75267f59d7084e0468bd68beeb1bf9c71d7c0; Linux 5.6.

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

Yes. Fixed in Linux 3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332. No fix listed yet: follow the vendor advisory.

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

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/bb70fcae4115d24b7e8cee17a6da8b1943f546bb>
- patch: <https://git.kernel.org/stable/c/3a41c0f2a5c3bf72b4c4e9dd4b1025378201e332>
- patch: <https://git.kernel.org/stable/c/fd0efd4f7bfe611a8339ba01bc2ac3c33e79159d>
- patch: <https://git.kernel.org/stable/c/e0d75267f59d7084e0468bd68beeb1bf9c71d7c0>

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

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