In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix sleeping function called from invalid context on RT kernel
When setting bootparams="traceevent=initcall:initcallstart tpprintk=1" in the cmdline, the outputprintk() was called, and the spinlockirqsave() was called in the atomic and irq disable interrupt context suitation. On the PREEMPTRT kernel, these locks are replaced with sleepable rt-spinlock, so the stack calltrace will be triggered. Fix it by rawspinlockirqsave when PREEMPTRT and "traceevent=initcall:initcallstart tpprintk=1" enabled.
BUG: sleeping function called from invalid context at kernel/locking/spinlockrt.c:46 inatomic(): 1, irqsdisabled(): 0, nonblock: 0, pid: 1, name: swapper/0 preemptcount: 2, expected: 0 RCU nest depth: 0, expected: 0 Preemption disabled at: [<ffffffff8992303e>] trytowakeup+0x7e/0xba0 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.17.1-rt17+ #19 34c5812404187a875f32bee7977f7367f9679ea7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x60/0x8c dumpstack+0x10/0x12 _mightresched.cold+0x11d/0x155 rtspinlock+0x40/0x70 traceeventbuffercommit+0x2fa/0x4c0 ? mapvsyscall+0x93/0x93 traceeventraweventinitcallstart+0xbe/0x110 ? perftraceinitcallfinish+0x210/0x210 ? probeschedwakeup+0x34/0x40 ? ttwudowakeup+0xda/0x310 ? tracehardirqson+0x35/0x170 ? mapvsyscall+0x93/0x93 dooneinitcall+0x217/0x3c0 ? traceeventraweventinitcalllevel+0x170/0x170 ? pushcpustop+0x400/0x400 ? cblistinitgeneric+0x241/0x290 kernelinitfreeable+0x1ac/0x347 ? _rawspinunlockirq+0x65/0x80 ? restinit+0xf0/0xf0 kernelinit+0x1e/0x150 retfromfork+0x22/0x30 </TASK>
[
{
"id": "CVE-2022-49322-615332e1",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"123646134526579804276082906626144715053",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"322660081573469916594547934107705048230"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1788e6dbb61286215442b1af99e51405a6206762",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-6cac804a",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"27647062067908381924322269699810260820",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"182630662076554953964058667985420590287"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be1f323fb9d9b14a505ca22d742d321769454de1",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-913b0f90",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"123646134526579804276082906626144715053",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"322660081573469916594547934107705048230"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43bfc4dccc416c964b53cbdc430e814f8b6f770b",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-98433bc3",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"27647062067908381924322269699810260820",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"182630662076554953964058667985420590287"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48c6ee7d6c614f09b2c8553a95eefef6ecf196e0",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-bca2d90e",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"27647062067908381924322269699810260820",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"182630662076554953964058667985420590287"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@40f9fde06b25884baa0c4bd138b909a9b67218b4",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-dde85dcc",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"123646134526579804276082906626144715053",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"322660081573469916594547934107705048230"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9abf3db8bdb63ab545034148ef2118f4d088ca59",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-f78cc490",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"123646134526579804276082906626144715053",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"322660081573469916594547934107705048230"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b534640a2c6a8d88168febc82ec6d161184f2ec",
"signature_type": "Line"
},
{
"id": "CVE-2022-49322-fe3ea179",
"deprecated": false,
"digest": {
"line_hashes": [
"242827376261834120896664430955772659876",
"68224611189684898652579275605551694861",
"235954911068529034469636684862091383757",
"246140610525662605267311025753790314224",
"123646134526579804276082906626144715053",
"268465788925769487801941608095131347791",
"10928985219897937428059417197284854279",
"140676414584590508298778969146789135829",
"233037606953774474778924081506358389329",
"153334346312853536417067470340817766636",
"62429136169953308688386295032324662009",
"173164821094370999145533878513031107190",
"54308022268539407547927118513553275298",
"322660081573469916594547934107705048230"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "kernel/trace/trace.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12025abdc8539ed9d5014e2d647a3fd1bd3de5cd",
"signature_type": "Line"
}
]