CVE-2022-49802

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49802
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49802.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49802
Related
Published
2025-05-01T15:16:03Z
Modified
2025-05-02T14:46:06.013628Z
Summary
[none]
Details

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

ftrace: Fix null pointer dereference in ftraceaddmod()

The @ftracemod is allocated by kzalloc(), so both the members {prev,next} of @ftracemode->list are NULL, it's not a valid state to call listdel(). If kstrdup() for @ftracemod->{func|module} fails, it goes to @outfree tag and calls freeftracemod() to destroy @ftracemod, then list_del() will write prev->next and next->prev, where null pointer dereference happens.

BUG: kernel NULL pointer dereference, address: 0000000000000008 Oops: 0002 [#1] PREEMPT SMP NOPTI Call Trace: <TASK> ftracemodcallback+0x20d/0x220 ? dofilpopen+0xd9/0x140 ftraceprocessregex.isra.51+0xbf/0x130 ftraceregexwrite.isra.52.part.53+0x6e/0x90 vfswrite+0xee/0x3a0 ? _auditfilterop+0xb1/0x100 ? auditdtesttask+0x38/0x50 ksyswrite+0xa5/0xe0 dosyscall64+0x3a/0x90 entrySYSCALL64after_hwframe+0x63/0xcd Kernel panic - not syncing: Fatal exception

So call INITLISTHEAD() to initialize the list member to fix this issue.

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.158-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1~bpo10+1
5.10.120-1
5.10.127-1
5.10.127-2~bpo10+1
5.10.127-2
5.10.136-1
5.10.140-1
5.10.148-1
5.10.149-1
5.10.149-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.10-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.10-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}