Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c8c9d51 authored by Li RongQing's avatar Li RongQing Committed by Greg Kroah-Hartman
Browse files

libnvdimm/pmem: fix a possible OOB access when read and write pmem



[ Upstream commit 9dc6488e84b0f64df17672271664752488cd6a25 ]

If offset is not zero and length is bigger than PAGE_SIZE,
this will cause to out of boundary access to a page memory

Fixes: 98cc093c ("block, THP: make block_device_operations.rw_page support THP")
Co-developed-by: default avatarLiang ZhiCheng <liangzhicheng@baidu.com>
Signed-off-by: default avatarLiang ZhiCheng <liangzhicheng@baidu.com>
Signed-off-by: default avatarLi RongQing <lirongqing@baidu.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f2565d0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment