CVE-2026-31703
Gravedad CVSS v3.1:
ALTA
Tipo:
CWE-416
Utilización después de liberación
Fecha de publicación:
01/05/2026
Última modificación:
06/05/2026
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
writeback: Fix use after free in inode_switch_wbs_work_fn()<br />
<br />
inode_switch_wbs_work_fn() has a loop like:<br />
<br />
wb_get(new_wb);<br />
while (1) {<br />
list = llist_del_all(&new_wb->switch_wbs_ctxs);<br />
/* Nothing to do? */<br />
if (!list)<br />
break;<br />
... process the items ...<br />
}<br />
<br />
Now adding of items to the list looks like:<br />
<br />
wb_queue_isw()<br />
if (llist_add(&isw->list, &wb->switch_wbs_ctxs))<br />
queue_work(isw_wq, &wb->switch_work);<br />
<br />
Because inode_switch_wbs_work_fn() loops when processing isw items, it<br />
can happen that wb->switch_work is pending while wb->switch_wbs_ctxs is<br />
empty. This is a problem because in that case wb can get freed (no isw<br />
items -> no wb reference) while the work is still pending causing<br />
use-after-free issues.<br />
<br />
We cannot just fix this by cancelling work when freeing wb because that<br />
could still trigger problematic 0 -> 1 transitions on wb refcount due to<br />
wb_get() in inode_switch_wbs_work_fn(). It could be all handled with<br />
more careful code but that seems unnecessarily complex so let&#39;s avoid<br />
that until it is proven that the looping actually brings practical<br />
benefit. Just remove the loop from inode_switch_wbs_work_fn() instead.<br />
That way when wb_queue_isw() queues work, we are guaranteed we have<br />
added the first item to wb->switch_wbs_ctxs and nobody is going to<br />
remove it (and drop the wb reference it holds) until the queued work<br />
runs.
Impacto
Puntuación base 3.x
7.80
Gravedad 3.x
ALTA
Productos y versiones vulnerables
| CPE | Desde | Hasta |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.18 (incluyendo) | 6.18.25 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (incluyendo) | 7.0.2 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:* |
Para consultar la lista completa de nombres de CPE con productos y versiones, ver esta página



