Files
linux/fs
Liu Song 2f0a77ccae ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len
[ Upstream commit acc5af3efa ]

In “ubifs_check_node”, when the value of "node_len" is abnormal,
the code will goto label of "out_len" for execution. Then, in the
following "ubifs_dump_node", if inode type is "UBIFS_DATA_NODE",
in "print_hex_dump", an out-of-bounds access may occur due to the
wrong "ch->len".

Therefore, when the value of "node_len" is abnormal, data length
should to be adjusted to a reasonable safe range. At this time,
structured data is not credible, so dump the corrupted data directly
for analysis.

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:14:40 +02:00
..
2020-08-19 08:15:06 +02:00
2019-08-06 19:06:51 +02:00
2020-08-19 08:15:02 +02:00
2020-07-29 10:16:46 +02:00
2018-08-17 16:20:28 -07:00
2020-08-26 10:31:01 +02:00
2019-12-13 08:51:59 +01:00
2018-08-17 16:20:27 -07:00
2020-06-22 09:05:01 +02:00
2020-09-03 11:24:24 +02:00
2020-03-05 16:42:12 +01:00
2020-10-01 13:14:27 +02:00
2020-03-25 08:06:14 +01:00