In the Linux kernel, the following vulnerability has been resolved:
mm/kmemleak: avoid deadlock by moving prwarn() outside kmemleaklock
When netpoll is enabled, calling prwarnonce() while holding kmemleaklock in mempoolalloc() can cause a deadlock due to lock inversion with the netconsole subsystem. This occurs because prwarnonce() may trigger netpoll, which eventually leads to _allocskb() and back into kmemleak code, attempting to reacquire kmemleaklock.
This is the path for the deadlock.
mempoolalloc() -> rawspinlockirqsave(&kmemleaklock, flags); -> prwarnonce() -> netconsole subsystem -> netpoll -> _allocskb -> _createobject -> rawspinlockirqsave(&kmemleaklock, flags);
Fix this by setting a flag and issuing the prwarnonce() after kmemleak_lock is released.
[
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-023b4b75",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@62879faa8efe8d8a9c7bf7606ee9c068012d7dac"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"301500077763560638004416048593462067474",
"146915284050427433023241811975644099576",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-0904e054",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a181b228b37a6a5625dad2bb4265bb7abb673e9f"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-0d904135",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c7b6ea0ede687e7460e593c5ea478f50aa41682a"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-2536a482",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1da95d3d4b7b1d380ebd87b71a61e7e6aed3265d"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"165934470577290377211494890075001407979",
"17212373272550686518594185885745365456",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-26f7ffc9",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1da95d3d4b7b1d380ebd87b71a61e7e6aed3265d"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-34c97790",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f249d32bb54876b4b6c3ae071af8ddca77af390b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"301500077763560638004416048593462067474",
"146915284050427433023241811975644099576",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-3c2b72d4",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08f70be5e406ce47c822f2dd11c1170ca259605b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"165934470577290377211494890075001407979",
"17212373272550686518594185885745365456",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-4ec39adc",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@62879faa8efe8d8a9c7bf7606ee9c068012d7dac"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-503f2c95",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47b0f6d8f0d2be4d311a49e13d2fd5f152f492b2"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"165934470577290377211494890075001407979",
"17212373272550686518594185885745365456",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-5e1fad76",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b0151e1d468eb2667c37b7af99b3c075072d334"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-723605da",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a181b228b37a6a5625dad2bb4265bb7abb673e9f"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-cf959850",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b0151e1d468eb2667c37b7af99b3c075072d334"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"301500077763560638004416048593462067474",
"146915284050427433023241811975644099576",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-d982239a",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47b0f6d8f0d2be4d311a49e13d2fd5f152f492b2"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"165934470577290377211494890075001407979",
"17212373272550686518594185885745365456",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-e317a2d4",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c7b6ea0ede687e7460e593c5ea478f50aa41682a"
},
{
"signature_type": "Function",
"digest": {
"length": 569.0,
"function_hash": "159125209355292138307363681297523269520"
},
"target": {
"file": "mm/kmemleak.c",
"function": "mem_pool_alloc"
},
"signature_version": "v1",
"id": "CVE-2025-39736-e8f2f977",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08f70be5e406ce47c822f2dd11c1170ca259605b"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"154982018078705245804773571040080949918",
"291962012659651863596434192661512239450",
"165934470577290377211494890075001407979",
"17212373272550686518594185885745365456",
"67928913493330050743311339974783017266",
"98102193939943551257821460470618182288",
"200510801437841521448522654867870532708",
"115971375094066708191838614069372003479",
"298056779784445301122640120059187019302"
]
},
"target": {
"file": "mm/kmemleak.c"
},
"signature_version": "v1",
"id": "CVE-2025-39736-f02c4a74",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f249d32bb54876b4b6c3ae071af8ddca77af390b"
}
]