CVE-2023-52978

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52978
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52978.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-52978
Related
Published
2025-03-27T17:15:44Z
Modified
2025-04-15T14:49:22Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

riscv: kprobe: Fixup kernel panic when probing an illegal position

The kernel would panic when probed for an illegal position. eg:

(CONFIGRISCVISA_C=n)

echo 'p:hello kernelclone+0x16 a0=%a0' >> kprobeevents echo 1 > events/kprobes/hello/enable cat trace

Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: _dosysnewfstatat+0xb8/0xb8 CPU: 0 PID: 111 Comm: sh Not tainted 6.2.0-rc1-00027-g2d398fe49a4d #490 Hardware name: riscv-virtio,qemu (DT) Call Trace: [<ffffffff80007268>] dumpbacktrace+0x38/0x48 [<ffffffff80c5e83c>] showstack+0x50/0x68 [<ffffffff80c6da28>] dumpstacklvl+0x60/0x84 [<ffffffff80c6da6c>] dumpstack+0x20/0x30 [<ffffffff80c5ecf4>] panic+0x160/0x374 [<ffffffff80c6db94>] generichandlearchirq+0x0/0xa8 [<ffffffff802deeb0>] sysnewstat+0x0/0x30 [<ffffffff800158c0>] sysclone+0x20/0x30 [<ffffffff800039e8>] retfromsyscall+0x0/0x4 ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: _dosysnewfstatat+0xb8/0xb8 ]---

That is because the kprobe's ebreak instruction broke the kernel's original code. The user should guarantee the correction of the probe position, but it couldn't make the kernel panic.

This patch adds archcheckkprobe in archpreparekprobe to prevent an illegal position (Such as the middle of an instruction).

References

Affected packages

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.1.11-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.1.11-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}