lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20220713092859.3881376-2-sunke32@huawei.com> Date: Wed, 13 Jul 2022 17:28:58 +0800 From: Sun Ke <sunke32@...wei.com> To: <fstests@...r.kernel.org> CC: <zlang@...nel.org>, <linux-ext4@...r.kernel.org>, <sunke32@...wei.com> Subject: [PATCH v3 1/2] ext4: resize fs after resize_inode without e2fsck Forget to run requested e2fsck after resize_inode, then resize fs, it will trigger off null pointer. Regression test for commit b55c3cd102a6 ext4: add reserved GDT blocks check. Signed-off-by: Sun Ke <sunke32@...wei.com> --- tests/ext4/057 | 44 ++++++++++++++++++++++++++++++++++++++++++++ tests/ext4/057.out | 3 +++ 2 files changed, 47 insertions(+) create mode 100755 tests/ext4/057 create mode 100644 tests/ext4/057.out diff --git a/tests/ext4/057 b/tests/ext4/057 new file mode 100755 index 00000000..44dae76c --- /dev/null +++ b/tests/ext4/057 @@ -0,0 +1,44 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 HUAWEI. All Rights Reserved. +# +# FS QA Test 057 +# +# Forget to run requested e2fsck after resize_inode, then resize fs, +# it will trigger off null pointer. +# +# Regression test for commit +# b55c3cd102a6 ext4: add reserved GDT blocks check +# +. ./common/preamble +_begin_fstest auto resize quick + +# real QA test starts here + +# Modify as appropriate. +_supported_fs ext4 +_fixed_by_kernel_commit b55c3cd102a6 \ + "ext4: add reserved GDT blocks check" + +_require_scratch +_require_command "$TUNE2FS_PROG" tune2fs +_require_command "$RESIZE2FS_PROG" resize2fs +_require_scratch_size $((1024 * 1024)) #kB + +# set fs size 512M +dev_size=$((512 * 1024 * 1024)) +_scratch_mkfs_sized $dev_size >> $seqres.full 2>&1 + +# forget to run requested e2fsck after resize_inode +$TUNE2FS_PROG -O ^resize_inode $SCRATCH_DEV | grep -w "e2fsck" + +_scratch_mount + +# resize fs will trigger NULL pointer in ext4_flex_group_add +$RESIZE2FS_PROG $SCRATCH_DEV 1G >> $seqres.full 2>&1 + +echo "Silence is golden" + +# success, all done +status=0 +exit diff --git a/tests/ext4/057.out b/tests/ext4/057.out new file mode 100644 index 00000000..4784ad7e --- /dev/null +++ b/tests/ext4/057.out @@ -0,0 +1,3 @@ +QA output created by 057 +Please run e2fsck -f on the filesystem. +Silence is golden -- 2.13.6
Powered by blists - more mailing lists