In the Linux kernel, the following vulnerability has been resolved:
drop_monitor: fix incorrect initialization order
Syzkaller reports the following bug:
BUG: spinlock bad magic on CPU#1, syz-executor.0/7995 lock: 0xffff88805303f3e0, .magic: 00000000, .owner: <none>/-1, .ownercpu: 0 CPU: 1 PID: 7995 Comm: syz-executor.0 Tainted: G E 5.10.209+ #1 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Call Trace: dumpstack lib/dumpstack.c:77 [inline] dumpstack+0x119/0x179 lib/dumpstack.c:118 debugspinlockbefore kernel/locking/spinlockdebug.c:83 [inline] dorawspinlock+0x1f6/0x270 kernel/locking/spinlockdebug.c:112 _rawspinlockirqsave include/linux/spinlockapismp.h:117 [inline] _rawspinlockirqsave+0x50/0x70 kernel/locking/spinlock.c:159 resetpercpudata+0xe6/0x240 [dropmonitor] netdmcmdtrace+0x43d/0x17a0 [dropmonitor] genlfamilyrcvmsgdoit+0x22f/0x330 net/netlink/genetlink.c:739 genlfamilyrcvmsg net/netlink/genetlink.c:783 [inline] genlrcvmsg+0x341/0x5a0 net/netlink/genetlink.c:800 netlinkrcvskb+0x14d/0x440 net/netlink/afnetlink.c:2497 genlrcv+0x29/0x40 net/netlink/genetlink.c:811 netlinkunicastkernel net/netlink/afnetlink.c:1322 [inline] netlinkunicast+0x54b/0x800 net/netlink/afnetlink.c:1348 netlinksendmsg+0x914/0xe00 net/netlink/afnetlink.c:1916 socksendmsgnosec net/socket.c:651 [inline] _socksendmsg+0x157/0x190 net/socket.c:663 syssendmsg+0x712/0x870 net/socket.c:2378 _syssendmsg+0xf8/0x170 net/socket.c:2432 _syssendmsg+0xea/0x1b0 net/socket.c:2461 dosyscall64+0x30/0x40 arch/x86/entry/common.c:46 entrySYSCALL64afterhwframe+0x62/0xc7 RIP: 0033:0x7f3f9815aee9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3f972bf0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3f9826d050 RCX: 00007f3f9815aee9 RDX: 0000000020000000 RSI: 0000000020001300 RDI: 0000000000000007 RBP: 00007f3f981b63bd R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f3f9826d050 R15: 00007ffe01ee6768
If dropmonitor is built as a kernel module, syzkaller may have time to send a netlink NETDMCMDSTART message during the module loading. This will call the netdmmonitor_start() function that uses a spinlock that has not yet been initialized.
To fix this, let's place resource initialization above the registration of a generic netlink family.
Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller.
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-08918299"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fcfc00bfec7bb6661074cb21356d05a4c9470a3c",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-262f1b71"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e9e0f224ffd8b819da3ea247dda404795fdd182",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-2c0409a2"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fcfc00bfec7bb6661074cb21356d05a4c9470a3c",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-372db220"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fcfc00bfec7bb6661074cb21356d05a4c9470a3c",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-38cb1b3c"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-4d9eda3d"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@219a47d0e6195bd202f22855e35f25bd15bc4d58",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-54cf8d2a"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7859e8643e75619b2705b4fcac93ffd94d72b4a",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-5f4a4811"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@219a47d0e6195bd202f22855e35f25bd15bc4d58",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-667bc373"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@29f9cdcab3d96d5207a5c92b52c40ad75e5915d8",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-679bf53b"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7859e8643e75619b2705b4fcac93ffd94d72b4a",
"digest": {
"line_hashes": [
"73626199501478873337982193525700092560",
"266723754278935023144707010464394712024",
"174043573681772438253638850395839659514",
"337532947399284586685327971341320374504",
"96166429779114564000416612282711593136",
"329480866048474045241411320164219616976",
"237632524649209078664859832590995143654",
"101032190530788277268465001623947925901",
"168424844210351469233942938348779652243",
"156260301341582876405885231365110720066",
"174276220374459604361948798908204230162",
"317633030901336848544246415317051130796",
"13162410213883132111382185617576095814",
"329903292412478816251028671613579794696",
"297711944291019777661021939215936140195",
"238013978103283875018501584525516018354",
"212784201049782298870412403671179813929",
"316735145148378618870587899030763895009",
"335517956597074679010726929577307598595",
"142564843924371480333206541705502269309",
"142089609018430670424949189878996459610",
"178866754509476370696269779638648668935",
"135860450283844311477115578712582270067",
"274946290124191082864627769031285526350",
"76491451736236749306771915169714129382",
"87494046031302785895083805687779864130",
"62106159204504467500685851125825302917",
"126112054839428690352291363174110719091",
"66782267946703360836744973620417004951",
"37386771987318775984594309111449955062",
"192555596156814095824983888457786011786"
],
"threshold": 0.9
},
"id": "CVE-2025-21862-820b9112"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@29f9cdcab3d96d5207a5c92b52c40ad75e5915d8",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-9dbc8518"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@219a47d0e6195bd202f22855e35f25bd15bc4d58",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-ca4dace4"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7859e8643e75619b2705b4fcac93ffd94d72b4a",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-dd4d490c"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "init_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e9e0f224ffd8b819da3ea247dda404795fdd182",
"digest": {
"length": 767.0,
"function_hash": "1110668977787925762273347075018639973"
},
"id": "CVE-2025-21862-e42ad95a"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@29f9cdcab3d96d5207a5c92b52c40ad75e5915d8",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-e7e582f5"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e9e0f224ffd8b819da3ea247dda404795fdd182",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-eed45eda"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "net/core/drop_monitor.c",
"function": "exit_net_drop_monitor"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea",
"digest": {
"length": 224.0,
"function_hash": "332784734562801967609625922104662187276"
},
"id": "CVE-2025-21862-fb122092"
}
]