{"id":"CVE-2025-71181","aliases":["CVE-2025-71181"],"related":[],"kind":"vulnerability","state":"published","title":"rust_binder: remove spin_lock() in rust_shrink_free_page()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nrust_binder: remove spin_lock() in rust_shrink_free_page()\n\nWhen forward-porting Rust Binder to 6.18, I neglected to take commit\nfb56fdf8b9a2 (\"mm/list_lru: split the lock to per-cgroup scope\") into\naccount, and apparently I did not end up running the shrinker callback\nwhen I sanity tested the driver before submission. This leads to crashes\nlike the following:\n\n\t============================================\n\tWARNING: possible recursive locking detected\n\t6.18.0-mainline-maybe-dirty #1 Tainted: G          IO\n\t--------------------------------------------\n\tkswapd0/68 is trying to acquire lock:\n\tffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: lock_list_lru_of_memcg+0x128/0x230\n\n\tbut task is already holding lock:\n\tffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: rust_helper_spin_lock+0xd/0x20\n\n\tother info that might help us debug this:\n\t Possible unsafe locking scenario:\n\n\t       CPU0\n\t       ----\n\t  lock(&l->lock);\n\t  lock(&l->lock);\n\n\t *** DEADLOCK ***\n\n\t May be due to missing lock nesting notation\n\n\t3 locks held by kswapd0/68:\n\t #0: ffffffff90d2e260 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x597/0x1160\n\t #1: ffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: rust_helper_spin_lock+0xd/0x20\n\t #2: ffffffff90cf3680 (rcu_read_lock){....}-{1:2}, at: lock_list_lru_of_memcg+0x2d/0x230\n\nTo fix this, remove the spin_lock() call from rust_shrink_free_page().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nrust_binder: remove spin_lock() in rust_shrink_free_page()\n\nWhen forward-porting Rust Binder to 6.18, I neglected to take commit\nfb56fdf8b9a2 (\"mm/list_lru: split the lock to per-cgroup scope\") into\naccount, and apparently I did not end up running the shrinker callback\nwhen I sanity tested the driver before submission. This leads to crashes\nlike the following:\n\n\t============================================\n\tWARNING: possible recursive locking detected\n\t6.18.0-mainline-maybe-dirty #1 Tainted: G          IO\n\t--------------------------------------------\n\tkswapd0/68 is trying to acquire lock:\n\tffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: lock_list_lru_of_memcg+0x128/0x230\n\n\tbut task is already holding lock:\n\tffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: rust_helper_spin_lock+0xd/0x20\n\n\tother info that might help us debug this:\n\t Possible unsafe locking scenario:\n\n\t       CPU0\n\t       ----\n\t  lock(&l->lock);\n\t  lock(&l->lock);\n\n\t *** DEADLOCK ***\n\n\t May be due to missing lock nesting notation\n\n\t3 locks held by kswapd0/68:\n\t #0: ffffffff90d2e260 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x597/0x1160\n\t #1: ffff956000fa18b0 (&l->lock){+.+.}-{2:2}, at: rust_helper_spin_lock+0xd/0x20\n\t #2: ffffffff90cf3680 (rcu_read_lock){....}-{1:2}, at: lock_list_lru_of_memcg+0x2d/0x230\n\nTo fix this, remove the spin_lock() call from rust_shrink_free_page().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nrust_binder: eliminar spin_lock() en rust_shrink_free_page()\n\nAl portar Rust Binder a la versión 6.18, descuidé tener en cuenta el commit fb56fdf8b9a2 ('mm/list_lru: split the lock to per-cgroup scope'), y aparentemente no terminé ejecutando la devolución de llamada del reductor cuando probé la cordura del controlador antes de la entrega. Esto lleva a fallos como el siguiente:\n\n\t============================================\n\tADVERTENCIA: posible bloqueo recursivo detectado\n\t6.18.0-mainline-maybe-dirty #1 Tainted: G          IO\n\t--------------------------------------------\n\tkswapd0/68 está intentando adquirir el bloqueo:\n\tffff956000fa18b0 (&amp;l-&gt;lock){+.+.}-{2:2}, en: lock_list_lru_of_memcg+0x128/0x230\n\n\tpero la tarea ya está manteniendo el bloqueo:\n\tffff956000fa18b0 (&amp;l-&gt;lock){+.+.}-{2:2}, en: rust_helper_spin_lock+0xd/0x20\n\n\totra información que podría ayudarnos a depurar esto:\n\t Posible escenario de bloqueo inseguro:\n\n\t       CPU0\n\t       ----\n\t  lock(&amp;l-&gt;lock);\n\t  lock(&amp;l-&gt;lock);\n\n\t * INTERBLOQUEO *\n\n\t Puede deberse a la falta de notación de anidamiento de bloqueo\n\n\t3 bloqueos mantenidos por kswapd0/68:\n\t #0: ffffffff90d2e260 (fs_reclaim){+.+.}-{0:0}, en: kswapd+0x597/0x1160\n\t #1: ffff956000fa18b0 (&amp;l-&gt;lock){+.+.}-{2:2}, en: rust_helper_spin_lock+0xd/0x20\n\t #2: ffffffff90cf3680 (rcu_read_lock){....}-{1:2}, en: lock_list_lru_of_memcg+0x2d/0x230\n\nPara solucionar esto, elimine la llamada a spin_lock() de rust_shrink_free_page().","source":"nvd"}],"published":"2026-01-31T11:38:54.221Z","modified":"2026-06-17T10:03:50.223Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"eafedbc7c050c44744fbdf80bdf3315e860b7513","fixed":"30a98c97f7874031f2e1de19c777ce011143cba4","status":"affected"},{"type":"git","introduced":"eafedbc7c050c44744fbdf80bdf3315e860b7513","fixed":"361e0ff456a8daf9753c18030533256e4133ce7a","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.18","status":"unaffected"},{"type":"semver","introduced":"6.18.6","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.18.1","fixed":"6.18.6"},{"status":"affected","version":"6.18"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/30a98c97f7874031f2e1de19c777ce011143cba4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/361e0ff456a8daf9753c18030533256e4133ce7a","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71181","url":"https://www.cve.org/CVERecord?id=CVE-2025-71181","licence":"CVE Terms of Use","modified":"2026-05-11T21:56:13.676Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71181","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71181","licence":"Public domain","modified":"2026-06-17T10:03:50.223Z"}],"updatedAt":"2026-11-25T22:59:10.964Z","epss":{"score":0.00119,"percentile":0.01955,"date":"2026-12-01T12:00:22.000Z"}}