{"id":"CVE-2026-43402","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-05-08T15:16:51.670","lastModified":"2026-11-11T20:10:00.273","vulnStatus":"Modified","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nkthread: consolidate kthread exit paths to prevent use-after-free\n\nGuillaume reported crashes via corrupted RCU callback function pointers\nduring KUnit testing. The crash was traced back to the pidfs rhashtable\nconversion which replaced the 24-byte rb_node with an 8-byte rhash_head\nin struct pid, shrinking it from 160 to 144 bytes.\n\nstruct kthread (without CONFIG_BLK_CGROUP) is also 144 bytes. With\nCONFIG_SLAB_MERGE_DEFAULT and SLAB_HWCACHE_ALIGN both round up to\n192 bytes and share the same slab cache. struct pid.rcu.func and\nstruct kthread.affinity_node both sit at offset 0x78.\n\nWhen a kthread exits via make_task_dead() it bypasses kthread_exit() and\nmisses the affinity_node cleanup. free_kthread_struct() frees the memory\nwhile the node is still linked into the global kthread_affinity_list. A\nsubsequent list_del() by another kthread writes through dangling list\npointers into the freed and reused memory, corrupting the pid's\nrcu.func pointer.\n\nInstead of patching free_kthread_struct() to handle the missed cleanup,\nconsolidate all kthread exit paths. Turn kthread_exit() into a macro\nthat calls do_exit() and add kthread_do_exit() which is called from\ndo_exit() for any task with PF_KTHREAD set. This guarantees that\nkthread-specific cleanup always happens regardless of the exit path -\nmake_task_dead(), direct do_exit(), or kthread_exit().\n\nReplace __to_kthread() with a new tsk_is_kthread() accessor in the\npublic header. Export do_exit() since module code using the\nkthread_exit() macro now needs it directly."},{"lang":"es","value":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nkthread: consolidar las rutas de salida de kthread para prevenir el uso después de liberación\n\nGuillaume informó de fallos a través de punteros de función de callback RCU corruptos durante las pruebas de KUnit. El fallo se rastreó hasta la conversión de rhashtable de pidfs que reemplazó el rb_node de 24 bytes con un rhash_head de 8 bytes en la estructura pid, reduciéndola de 160 a 144 bytes.\n\nLa estructura kthread (sin CONFIG_BLK_CGROUP) también es de 144 bytes. Con CONFIG_SLAB_MERGE_DEFAULT y SLAB_HWCACHE_ALIGN, ambos se redondean a 192 bytes y comparten la misma caché de slab. struct pid.rcu.func y struct kthread.affinity_node ambos se encuentran en el desplazamiento 0x78.\n\nCuando un kthread sale a través de make_task_dead(), omite kthread_exit() y la limpieza de affinity_node. free_kthread_struct() libera la memoria mientras el nodo aún está vinculado a la kthread_affinity_list global. Una posterior list_del() por otro kthread escribe a través de punteros de lista colgantes en la memoria liberada y reutilizada, corrompiendo el puntero rcu.func del pid.\n\nEn lugar de parchear free_kthread_struct() para manejar la limpieza omitida, consolidar todas las rutas de salida de kthread. Convertir kthread_exit() en una macro que llama a do_exit() y añadir kthread_do_exit() que es llamada desde do_exit() para cualquier tarea con PF_KTHREAD establecido. Esto garantiza que la limpieza específica de kthread siempre ocurre independientemente de la ruta de salida - make_task_dead(), do_exit() directo, o kthread_exit().\n\nReemplazar __to_kthread() con un nuevo accesor tsk_is_kthread() en el encabezado público. Exportar do_exit() ya que el código del módulo que usa la macro kthread_exit() ahora lo necesita directamente."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["include/linux/kthread.h","kernel/exit.c","kernel/kthread.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"4d13f4304fa43471bfea101658a11feec7b28ac0","lessThan":"4729c7b00a347fd37d0cbc265b85f2884c3e06b6","versionType":"git","status":"affected"},{"version":"4d13f4304fa43471bfea101658a11feec7b28ac0","lessThan":"5a591d7a5e48d30100943940a30a6ab41b15c672","versionType":"git","status":"affected"},{"version":"4d13f4304fa43471bfea101658a11feec7b28ac0","lessThan":"28aaa9c39945b7925a1cc1d513c8f21ed38f5e4f","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["include/linux/kthread.h","kernel/exit.c","kernel/kthread.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.14","status":"affected"},{"version":"0","lessThan":"6.14","versionType":"semver","status":"unaffected"},{"version":"6.18.19","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"6.19.9","lessThanOrEqual":"6.19.*","versionType":"semver","status":"unaffected"},{"version":"7.0","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-10-16T15:17:02.801558Z","id":"CVE-2026-43402","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"CWE-416"}]},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","description":[{"lang":"en","value":"CWE-416"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.19","matchCriteriaId":"7484E98E-61F0-4DCE-9DBF-83D2F75F99EB"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"6.19.9","matchCriteriaId":"E825E7C3-FEAC-4FD3-8A81-78D7387948C9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*","matchCriteriaId":"F253B622-8837-4245-BCE5-A7BF8FC76A16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*","matchCriteriaId":"4AE85AD8-4641-4E7C-A2F4-305E2CD9EE64"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/28aaa9c39945b7925a1cc1d513c8f21ed38f5e4f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/4729c7b00a347fd37d0cbc265b85f2884c3e06b6","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/5a591d7a5e48d30100943940a30a6ab41b15c672","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]}]}