Skip to content

backport to fix a race condition/UAF in padata_reorder

Bin Lan linux-crypto stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2padata: Fix pd UAF once and for allinclude/linux/padata.h kernel/padata.c+37 -1020 replies
2/2padata: Remove comment for reorder_workinclude/linux/padata.h+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 6.12.y 0/2] backport to fix a race condition/UAF in padata_reorder

After applying these patches to v6.12.y, the padata.c file matches the upstream version at commit 71203f68c774, with two exceptions:

1. cpumask_next_wrap API difference (line 310): The v6.12.y kernel still uses the old 4-argument form cpumask_next_wrap(cpu, pd->cpumask.pcpu, -1, false), whereas upstream uses the newer 2-argument form cpumask_next_wrap(cpu, pd->cpumask.pcpu). These are functionally equivalent — upstream simply changed the API signature in a separate commit (dc5bb9b769c9), which is too invasive to backport.

2. Divide-by-zero guard in padata_mt_helper (after line 496): The v6.12.y doesn't include an extra check that forces chunk_size to at least 1 when the caller sets min_chunk to 0. This prevents a divide-by-zero panic.

Thanks
Bin Lan

Herbert Xu (2):
padata: Fix pd UAF once and for all
padata: Remove comment for reorder_work

 include/linux/padata.h |   4 --
 kernel/padata.c        | 136 +++++++++++------------------------------
 2 files changed, 37 insertions(+), 103 deletions(-)
Signature · 1 line
2.43.0