In the Linux kernel, the following vulnerability has been resolved:
powerpc/64: Init jump labels before parseearlyparam()
On 64-bit, calling jumplabelinit() in setupfeaturekeys() is too late because static keys may be used in subroutines of parseearlyparam() which is again subroutine of earlyinitdevtree().
For example booting with "threadirqs":
statickeyenablecpuslocked(): static key '0xc000000002953260' used before call to jumplabelinit() WARNING: CPU: 0 PID: 0 at kernel/jumplabel.c:166 statickeyenablecpuslocked+0xfc/0x120 ... NIP statickeyenablecpuslocked+0xfc/0x120 LR statickeyenablecpuslocked+0xf8/0x120 Call Trace: statickeyenablecpuslocked+0xf8/0x120 (unreliable) statickeyenable+0x30/0x50 setupforcedirqthreads+0x28/0x40 doearlyparam+0xa0/0x108 parseargs+0x290/0x4e0 parseearlyoptions+0x48/0x5c parseearlyparam+0x58/0x84 earlyinitdevtree+0xd4/0x518 earlysetup+0xb4/0x214
So call jumplabelinit() just before parseearlyparam() in earlyinitdevtree().
[mpe: Add call trace to change log and minor wording edits.]
[
{
"id": "CVE-2022-50012-0d3308f1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8992141cb88f1d99fd11580f4423634700a99240",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-0f3e6e5d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3c9e9452a8ea12d335b1e59b2c72e1b99c699b8",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-16846d5a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e14b04c8459afbeea1eeb74e81af86d7b196a4d",
"signature_version": "v1",
"digest": {
"length": 1991.0,
"function_hash": "27497751976892118261707382939595116239"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-1b1fb7df",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3c9e9452a8ea12d335b1e59b2c72e1b99c699b8",
"signature_version": "v1",
"digest": {
"length": 2150.0,
"function_hash": "191906740674613345233262014973520615633"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-2a1ed2bc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca829e05d3d4f728810cc5e4b468d9ebc7745eb3",
"signature_version": "v1",
"digest": {
"line_hashes": [
"258829428208052719649580470929622207730",
"336254352019337754565453169759236111204",
"49004299695440664867965709127837225350"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-2be85b43",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dac28dff90849af4200b8269fcdc84cdc12fa46c",
"signature_version": "v1",
"digest": {
"length": 2152.0,
"function_hash": "222327415997505990365171068285895608109"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-595ce5d2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4ced9fd10073adc854919976b88ad6004271119",
"signature_version": "v1",
"digest": {
"length": 1810.0,
"function_hash": "97927040448673968932800628572937261778"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-7da4b74e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f9357313cdcadb0a311b44c29d4eaccc7fa632f",
"signature_version": "v1",
"digest": {
"length": 2153.0,
"function_hash": "167202686086124075788888482137805493249"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-aa7e4199",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4ced9fd10073adc854919976b88ad6004271119",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-afa04a3b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4bb1188e2b1ed98fa2b618cc0628ccba63c6c80f",
"signature_version": "v1",
"digest": {
"length": 1855.0,
"function_hash": "217030366357225070857286222898434138388"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-b62edf8a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dac28dff90849af4200b8269fcdc84cdc12fa46c",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-bbc0d6e4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca829e05d3d4f728810cc5e4b468d9ebc7745eb3",
"signature_version": "v1",
"digest": {
"length": 2153.0,
"function_hash": "167202686086124075788888482137805493249"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-bbdacd8b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f9357313cdcadb0a311b44c29d4eaccc7fa632f",
"signature_version": "v1",
"digest": {
"line_hashes": [
"258829428208052719649580470929622207730",
"336254352019337754565453169759236111204",
"49004299695440664867965709127837225350"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-bd554679",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e14b04c8459afbeea1eeb74e81af86d7b196a4d",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
},
{
"id": "CVE-2022-50012-dd7e3133",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8992141cb88f1d99fd11580f4423634700a99240",
"signature_version": "v1",
"digest": {
"length": 1840.0,
"function_hash": "215147491521370147518156259364648292907"
},
"target": {
"function": "early_init_devtree",
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Function",
"deprecated": false
},
{
"id": "CVE-2022-50012-f0eaaecb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4bb1188e2b1ed98fa2b618cc0628ccba63c6c80f",
"signature_version": "v1",
"digest": {
"line_hashes": [
"311128401447841618313683999305073494138",
"145996004768839160044120593370297431326",
"117581106111142051673451148249199927131"
],
"threshold": 0.9
},
"target": {
"file": "arch/powerpc/kernel/prom.c"
},
"signature_type": "Line",
"deprecated": false
}
]