{"id":"CVE-2026-139542","summary":"md: take reconfig_mutex when enabling PPL on an inactive array","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: take reconfig_mutex when enabling PPL on an inactive array\n\nconsistency_policy_store() sets MD_HAS_PPL for an external-metadata array\nthat is not running yet, without holding reconfig_mutex.  But -\u003epers is\nonly assigned after pers-\u003erun() returns, so \"not running\" also covers an\nmd_run() that is in progress under the lock.\n\nIf the write lands inside raid5_run() after log_init() has decided not to\nset up PPL, or after a failed ppl_init_log() has cleared the flag, the\nflag ends up set with conf-\u003elog_private still NULL.  The next idle pass\nof raid5d() then does:\n\n  raid5d() -\u003e handle_active_stripes() -\u003e log_flush_stripe_to_raid()\n    -\u003e ppl_write_stripe_run()\n\nand dereferences the NULL ppl_conf:\n\n  Oops: general protection fault, probably for non-canonical address\n  0xdffffc0000000002\n  KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]\n  RIP: 0010:ppl_write_stripe_run+0x60/0x1320 drivers/md/raid5-ppl.c:538\n\nTake reconfig_mutex around the update and refuse it with -EBUSY once the\narray is running, in which case -\u003echange_consistency_policy() is the\nright interface.","modified":"2026-12-01T21:02:38.783686736Z","published":"2026-11-30T13:35:43.575Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139542.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0406e097bb3128290e8b757898864dba93a7a1be"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0d7551660320b9605f36140e1b5657fd4b8812ed"},{"type":"WEB","url":"https://git.kernel.org/stable/c/28024177d04a3a76e193fbfb1abf064ad7b49d0a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3b3b14a11548b7b4183609900d9aa53020140f0f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/54c543e9162c02a4c6fbbff260ac4d238c612865"},{"type":"WEB","url":"https://git.kernel.org/stable/c/900bf42e0ff8009f66ffd4a679c56264957019dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/adfa3e105211e0099e1161afe487a1ca0622cdd1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f4d615026172f5c8ce49b14794c63b8b6223ec9a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139542.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139542"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"664aed04446c7f653d8acbe2cdf7989f28238524"},{"fixed":"0d7551660320b9605f36140e1b5657fd4b8812ed"},{"fixed":"adfa3e105211e0099e1161afe487a1ca0622cdd1"},{"fixed":"0406e097bb3128290e8b757898864dba93a7a1be"},{"fixed":"3b3b14a11548b7b4183609900d9aa53020140f0f"},{"fixed":"f4d615026172f5c8ce49b14794c63b8b6223ec9a"},{"fixed":"54c543e9162c02a4c6fbbff260ac4d238c612865"},{"fixed":"28024177d04a3a76e193fbfb1abf064ad7b49d0a"},{"fixed":"900bf42e0ff8009f66ffd4a679c56264957019dd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139542.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.12.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.119"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139542.json"}}],"schema_version":"1.9.2"}