Skip to content

Fix out-of-bounds maple tree isue

Liam Howlett linux-mm lkml 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/2maple_tree: Fix mas_expected_entries() off by oneinclude/linux/maple_tree.h lib/maple_tree.c+22 -50 replies
2/2kernel/fork: Detect mas_store() failure in dup_mmap()kernel/fork.c+5 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH Fix 0/2] Fix out-of-bounds maple tree isue

The out of bounds maple tree issue was actually a maple tree error being treated as a node. This was caused by the requested allocation of more nodes than was available while forking, but there was no memory available. This series adds one node to the calculated mas_expected_entries() to ensure there is enough nodes, adds a flag to WARN_ON() if a request for nodes is hit with zero nodes available during a preallocated operation, and also adds the necessary check in the fork operation to fail.

Liam R. Howlett (2):
maple_tree: Fix mas_expected_entries() off by one kernel/fork: Detect mas_store() failure in dup_mmap()

 include/linux/maple_tree.h |  1 +
 kernel/fork.c              |  5 +++++
 lib/maple_tree.c           | 26 +++++++++++++++++++++-----
 3 files changed, 27 insertions(+), 5 deletions(-)
Signature · 1 line
2.35.1