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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc382233-35ff-943e-d9f7-b17f9dce193d@huawei.com>
Date:   Tue, 12 Feb 2019 20:41:23 +0800
From:   yangerkun <yangerkun@...wei.com>
To:     Theodore Ts'o <tytso@....edu>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>
CC:     <jack@...e.com>, <miaoxie@...wei.com>, <yi.zhang@...wei.com>,
        <houtao1@...wei.com>
Subject: Re: [PATCH] ext4: disallow files with EXT4_JOURNAL_DATA_FL from
 EXT4_IOC_SWAP_BOOT

Reviewed-by: yangerkun <yangerkun@...wei.com>

Theodore Ts'o wrote on 2019/2/11 14:15:
> A malicious/clueless root user can use EXT4_IOC_SWAP_BOOT to force a
> corner casew which can lead to the file system getting corrupted.
> There's no usefulness to allowing this, so just prohibit this case.
> 
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
>   fs/ext4/ioctl.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
> index 2e76fb55d94a..eb8ca8d80885 100644
> --- a/fs/ext4/ioctl.c
> +++ b/fs/ext4/ioctl.c
> @@ -132,6 +132,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
>   
>   	if (inode->i_nlink != 1 || !S_ISREG(inode->i_mode) ||
>   	    IS_SWAPFILE(inode) || IS_ENCRYPTED(inode) ||
> +	    (EXT4_I(inode)->i_flags & EXT4_JOURNAL_DATA_FL) ||
>   	    ext4_has_inline_data(inode)) {
>   		err = -EINVAL;
>   		goto journal_err_out;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ