backport to fix a race condition/UAF in padata_reorder
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | padata: Fix pd UAF once and for allinclude/ kernel/ | +37 | 0 replies | |
| 2/2 | padata: Remove comment for reorder_workinclude/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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