CVE-2022-49006
published 2024-10-21CVE-2022-49006: In the Linux kernel, the following vulnerability has been resolved: tracing: Free buffers when a used dynamic event is removed After 65536 dynamic events have…
PriorityP338high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.26%
17.1th percentile
In the Linux kernel, the following vulnerability has been resolved:
tracing: Free buffers when a used dynamic event is removed
After 65536 dynamic events have been added and removed, the "type" field
of the event then uses the first type number that is available (not
currently used by other events). A type number is the identifier of the
binary blobs in the tracing ring buffer (known as events) to map them to
logic that can parse the binary blob.
The issue is that if a dynamic event (like a kprobe event) is traced and
is in the ring buffer, and then that event is removed (because it is
dynamic, which means it can be created and destroyed), if another dynamic
event is created that has the same number that new event's logic on
parsing the binary blob will be used.
To show how this can be an issue, the following can crash the kernel:
# cd /sys/kernel/tracing
# for i in `seq 65536`; do
echo 'p:kprobes/foo do_sys_openat2 $arg1:u32' > kprobe_events
# done
For every iteration of the above, the writing to the kprobe_events will
remove the old event and create a new one (with the same format) and
increase the type number to the next available on until the type number
reaches over 65535 which is the max number for the 16 bit type. After it
reaches that number, the logic to allocate a new number simply looks for
the next available number. When an dynamic event is removed, that number
is then available to be reused by the next dynamic event created. That is,
once the above reaches the max number, the number assigned to the event in
that loop will remain the same.
Now that means deleting one dynamic event and created another will reuse
the previous events type number. This is where bad things can happen.
After the above loop finishes, the kprobes/foo event which reads the
do_sys_openat2 function call's first parameter as an integer.
# echo 1 > kprobes/foo/enable
# cat /etc/passwd > /dev/null
# cat trace
cat-2211 [005] .... 2007.849603: foo: (do_sys_openat2+0x0/0x130) arg
Affected
16 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | linux | < linux 6.0.12-1 (bookworm) | linux 6.0.12-1 (bookworm) |
| linux | linux | — | — |
| linux | linux | >= 77b44d1b7c28360910cdbd427fb62d485c08674c < 1603feac154ff38514e8354e3079a455eb4801e2 | 1603feac154ff38514e8354e3079a455eb4801e2 |
| linux | linux | >= 77b44d1b7c28360910cdbd427fb62d485c08674c < be111ebd8868d4b7c041cb3c6102e1ae27d6dc1d | be111ebd8868d4b7c041cb3c6102e1ae27d6dc1d |
| linux | linux | >= 77b44d1b7c28360910cdbd427fb62d485c08674c < 417d5ea6e735e5d88ffb6c436cf2938f3f476dd1 | 417d5ea6e735e5d88ffb6c436cf2938f3f476dd1 |
| linux | linux | >= 77b44d1b7c28360910cdbd427fb62d485c08674c < c52d0c8c4f38f7580cff61c4dfe1034c580cedfd | c52d0c8c4f38f7580cff61c4dfe1034c580cedfd |
| linux | linux | >= 77b44d1b7c28360910cdbd427fb62d485c08674c < 4313e5a613049dfc1819a6dfb5f94cf2caff9452 | 4313e5a613049dfc1819a6dfb5f94cf2caff9452 |
| linux | linux_kernel | — | — |
| linux | linux_kernel | >= 0 < 5.10.158-1 | 5.10.158-1 |
| linux | linux_kernel | >= 0 < 6.0.12-1 | 6.0.12-1 |
| linux | linux_kernel | >= 0 < 6.0.12-1 | 6.0.12-1 |
| linux | linux_kernel | >= 0 < 6.0.12-1 | 6.0.12-1 |
| linux | linux_kernel | >= 2.6.33 < 5.4.226 | 5.4.226 |
| linux | linux_kernel | >= 5.11 < 5.15.82 | 5.15.82 |
| linux | linux_kernel | >= 5.16 < 6.0.12 | 6.0.12 |
| linux | linux_kernel | >= 5.5 < 5.10.158 | 5.10.158 |
CVSS provenance
nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv7.8HIGH
vendor_debian7.8HIGH
vendor_redhat7.8HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-xjr6-8999-vr65: In the Linux kernel, the following vulnerability has been resolved:
tracing: Free buffers when a used dynamic event is removed
After 65536 dynamic e
ghsa_unreviewed·2024-10-21
CVE-2022-49006 [HIGH] CWE-416 GHSA-xjr6-8999-vr65: In the Linux kernel, the following vulnerability has been resolved:
tracing: Free buffers when a used dynamic event is removed
After 65536 dynamic e
In the Linux kernel, the following vulnerability has been resolved:
tracing: Free buffers when a used dynamic event is removed
After 65536 dynamic events have been added and removed, the "type" field
of the event then uses the first type number that is available (not
currently used by other events). A type number is the identifier of the
binary blobs in the tracing ring buffer (known as events) to map them to
logic that can parse the binary blob.
The issue is that if a dynamic event (like a kprobe event) is traced and
is in the ring buffer, and then that event is removed (because it is
dynamic, which means it can be created and destroyed), if another dynamic
event is created that has the same number that new event's logic on
parsing the binary blob will be used.
To show how this can be
OSV
CVE-2022-49006: In the Linux kernel, the following vulnerability has been resolved: tracing: Free buffers when a used dynamic event is removed After 65536 dynamic eve
osv·2024-10-21·CVSS 7.8
CVE-2022-49006 [HIGH] CVE-2022-49006: In the Linux kernel, the following vulnerability has been resolved: tracing: Free buffers when a used dynamic event is removed After 65536 dynamic eve
In the Linux kernel, the following vulnerability has been resolved: tracing: Free buffers when a used dynamic event is removed After 65536 dynamic events have been added and removed, the "type" field of the event then uses the first type number that is available (not currently used by other events). A type number is the identifier of the binary blobs in the tracing ring buffer (known as events) to map them to logic that can parse the binary blob. The issue is that if a dynamic event (like a kprobe event) is traced and is in the ring buffer, and then that event is removed (because it is dynamic, which means it can be created and destroyed), if another dynamic event is created that has the same number that new event's logic on parsing the binary blob will be used. To show how this can be an
Red Hat
kernel: tracing: Free buffers when a used dynamic event is removed
vendor_redhat·2024-10-21·CVSS 7.8
CVE-2022-49006 [HIGH] CWE-416 kernel: tracing: Free buffers when a used dynamic event is removed
kernel: tracing: Free buffers when a used dynamic event is removed
In the Linux kernel, the following vulnerability has been resolved:
tracing: Free buffers when a used dynamic event is removed
After 65536 dynamic events have been added and removed, the "type" field
of the event then uses the first type number that is available (not
currently used by other events). A type number is the identifier of the
binary blobs in the tracing ring buffer (known as events) to map them to
logic that can parse the binary blob.
The issue is that if a dynamic event (like a kprobe event) is traced and
is in the ring buffer, and then that event is removed (because it is
dynamic, which means it can be created and destroyed), if another dynamic
event is created that has the same number that new event's logic
Debian
CVE-2022-49006: linux - In the Linux kernel, the following vulnerability has been resolved: tracing: Fr...
vendor_debian·2022·CVSS 7.8
CVE-2022-49006 [HIGH] CVE-2022-49006: linux - In the Linux kernel, the following vulnerability has been resolved: tracing: Fr...
In the Linux kernel, the following vulnerability has been resolved: tracing: Free buffers when a used dynamic event is removed After 65536 dynamic events have been added and removed, the "type" field of the event then uses the first type number that is available (not currently used by other events). A type number is the identifier of the binary blobs in the tracing ring buffer (known as events) to map them to logic that can parse the binary blob. The issue is that if a dynamic event (like a kprobe event) is traced and is in the ring buffer, and then that event is removed (because it is dynamic, which means it can be created and destroyed), if another dynamic event is created that has the same number that new event's logic on parsing the binary blob will be used. To show how this can be an
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://git.kernel.org/stable/c/1603feac154ff38514e8354e3079a455eb4801e2https://git.kernel.org/stable/c/417d5ea6e735e5d88ffb6c436cf2938f3f476dd1https://git.kernel.org/stable/c/4313e5a613049dfc1819a6dfb5f94cf2caff9452https://git.kernel.org/stable/c/be111ebd8868d4b7c041cb3c6102e1ae27d6dc1dhttps://git.kernel.org/stable/c/c52d0c8c4f38f7580cff61c4dfe1034c580cedfd
2024-10-21
Published