diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2020-06-16 09:11:44 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-13 22:12:32 +0100 |
commit | a33e30a0e023e9d1866866ca895c7789f48445e7 (patch) | |
tree | 383b2fd9b04365a17ed31c4b624d278cf8e23607 /fs/ubifs/file.c | |
parent | Revert "ubifs: Fix out-of-bounds memory access caused by abnormal value of no... (diff) | |
download | linux-a33e30a0e023e9d1866866ca895c7789f48445e7.tar.xz linux-a33e30a0e023e9d1866866ca895c7789f48445e7.zip |
ubifs: Pass node length in all node dumping callers
Function ubifs_dump_node() has been modified to avoid memory oob
accessing while dumping node, node length (corresponding to the
size of allocated memory for node) should be passed into all node
dumping callers.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index cacb970bcf48..2bc7780d2963 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -92,7 +92,7 @@ static int read_block(struct inode *inode, void *addr, unsigned int block, dump: ubifs_err(c, "bad data node (block %u, inode %lu)", block, inode->i_ino); - ubifs_dump_node(c, dn); + ubifs_dump_node(c, dn, UBIFS_MAX_DATA_NODE_SZ); return -EINVAL; } |