summaryrefslogtreecommitdiff
path: root/logd/SerializedLogChunkTest.cpp
diff options
context:
space:
mode:
authorHaoran.Wang <elven.wang@nxp.com>2020-06-16 15:46:56 +0800
committerHaoran.Wang <elven.wang@nxp.com>2020-06-16 15:54:37 +0800
commit4a489450f4698b44a6464aab913c8e86ca5cb158 (patch)
tree8776da5c03639eace04100dda1a9bdad24fa3078 /logd/SerializedLogChunkTest.cpp
parent53122b14bc6194dd55654a1ad35fea960ddfbcb6 (diff)
fsmgr: fix integer overflow in fs_mgr
As the EXT4_MAX_BLOCK_SIZE defined as 65536 which reached maxium value of unsigned int. The superblock value maybe larger than 65536. This is found by the Integer Overflow Sanitizer. This patch fixed below boot error when userdata is corrupted: init: processing action (fs) from (/vendor/etc/init/hw/init.freescale.rc:221) init: [libfs_mgr]Invalid ext4 superblock on '/dev/block/by-name/userdata' init: InitFatalReboot: signal 6 init: #00 pc 00000000000af7e8 /system/bin/init (android::init::InitFatalReboot(int)+208) init: #01 pc 00000000000afbd0 /system/bin/init (android::init::InstallRebootSignalHandlers()::$_22::__invoke(int)+32) init: #02 pc 00000000000006bc [vdso:0000ffff9691b000] (__kernel_rt_sigreturn) init: #03 pc 000000000004e070 /system/lib64/bootstrap/libc.so (abort+176) init: #04 pc 000000000003427c /system/lib64/libfs_mgr.so (read_ext4_superblock(std::__1::basic_string<char, std::__1::char_ traits<char>, std::__1::allocator<char> > const&, android::fs_mgr::FstabEntry const&, ext4_super_block*, int*)+1804) Test: boot with corrupted ext4 superblock Change-Id: I58ed723afa9975d0e93f96fad7c55465e68b3edd Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Diffstat (limited to 'logd/SerializedLogChunkTest.cpp')
0 files changed, 0 insertions, 0 deletions