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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190619123210.GA14477@xo-6d-61-c0.localdomain>
Date:   Wed, 19 Jun 2019 14:32:10 +0200
From:   Pavel Machek <pavel@....cz>
To:     pavel@....cz
Cc:     linux-kernel@...r.kernel.org,
        Randall Huang <huangrandall@...gle.com>,
        Chao Yu <yuchao0@...wei.com>, Jaegeuk Kim <jaegeuk@...nel.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 33/75] f2fs: fix to avoid accessing xattr across the
 boundary

Hi!

> When we traverse xattr entries via __find_xattr(),
> if the raw filesystem content is faked or any hardware failure occurs,
> out-of-bound error can be detected by KASAN.
> Fix the issue by introducing boundary check.

Ok, so this prevents fs corruption from causing problems,

> @@ -340,7 +347,11 @@ static int lookup_all_xattrs(struct inode *inode, struct page *ipage,
>  	else
>  		cur_addr = txattr_addr;
>  
> -	*xe = __find_xattr(cur_addr, index, len, name);
> +	*xe = __find_xattr(cur_addr, last_txattr_addr, index, len, name);
> +	if (!*xe) {
> +		err = -EFAULT;
> +		goto out;
> +	}

Is -EFAULT suitable here? We do not have userspace passing pointers to us, we
have fs corruption. -EUNCLEAN?

Should it do some kind of printk to let the user know fs is corrupted, and mark
it as needing fsck?

Thanks,
									Pavel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ