summary refs log tree commit diff
path: root/net/9p
diff options
context:
space:
mode:
authorPeng Zhang <zhangpeng.00@bytedance.com>2023-05-06 10:47:52 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-01 13:16:23 +0200
commit4e2ad53ababeaac44d71162650984abfe783960c (patch)
tree219227e617a2c09a3fd5c01d8e1d5d984322b6c0 /net/9p
parent31cde3bdadca2c660f768b3df43425e88041a691 (diff)
downloadlinux-4e2ad53ababeaac44d71162650984abfe783960c.tar.gz
maple_tree: fix potential out-of-bounds access in mas_wr_end_piv()
commit cd00dd2585c4158e81fdfac0bbcc0446afbad26d upstream.

Check the write offset end bounds before using it as the offset into the
pivot array.  This avoids a possible out-of-bounds access on the pivot
array if the write extends to the last slot in the node, in which case the
node maximum should be used as the end pivot.

akpm: this doesn't affect any current callers, but new users of mapletree
may encounter this problem if backported into earlier kernels, so let's
fix it in -stable kernels in case of this.

Link: https://lkml.kernel.org/r/20230506024752.2550-1-zhangpeng.00@bytedance.com
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/9p')
0 files changed, 0 insertions, 0 deletions