CVE-2022-50225: riscv:uprobe fix SR_SPIE set/clear handling
In the Linux kernel, the following vulnerability has been resolved:
riscv:uprobe fix SRSPIE set/clear handling
In riscv the process of uprobe going to clear spie before exec the origin insn,and set spie after that.But When access the page which origin insn has been placed a page fault may happen and irq was disabled in archuprobeprexol function,It cause a WARN as follows. There is no need to clear/set spie in archuprobepre/post/abortxol. We can just remove it.
[ 31.684157] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1488 [ 31.684677] inatomic(): 0, irqsdisabled(): 1, nonblock: 0, pid: 76, name: work [ 31.684929] preemptcount: 0, expected: 0 [ 31.685969] CPU: 2 PID: 76 Comm: work Tainted: G [ 31.686542] Hardware name: riscv-virtio,qemu (DT) [ 31.686797] Call Trace: [ 31.687053] [<ffffffff80006442>] dumpbacktrace+0x30/0x38 [ 31.687699] [<ffffffff80812118>] showstack+0x40/0x4c [ 31.688141] [<ffffffff8081817a>] dumpstacklvl+0x44/0x5c [ 31.688396] [<ffffffff808181aa>] dumpstack+0x18/0x20 [ 31.688653] [<ffffffff8003e454>] mightresched+0x114/0x122 [ 31.688948] [<ffffffff8003e4b2>] mightsleep+0x50/0x7a [ 31.689435] [<ffffffff80822676>] downread+0x30/0x130 [ 31.689728] [<ffffffff8000b650>] dopagefault+0x166/x446 [ 31.689997] [<ffffffff80003c0c>] retfromexception+0x0/0xc
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50225?
CVE-2022-50225 has been classified with a moderate severity level.
How do I fix CVE-2022-50225?
To fix CVE-2022-50225, update to the latest version of the Linux kernel where the vulnerability has been addressed.
What systems are impacted by CVE-2022-50225?
CVE-2022-50225 affects systems running the Linux kernel on riscv architecture.
What kind of vulnerability is CVE-2022-50225?
CVE-2022-50225 is a vulnerability related to improper handling of the SR_SPIE register in the riscv architecture.
Is CVE-2022-50225 publicly known?
Yes, CVE-2022-50225 is a publicly disclosed vulnerability.