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: <Y5UbhBTB2nSMN4UD@ZenIV>
Date:   Sat, 10 Dec 2022 23:51:32 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Nhat Pham <nphamcs@...il.com>
Cc:     akpm@...ux-foundation.org, hannes@...xchg.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, bfoster@...hat.com,
        willy@...radead.org, kernel-team@...a.com
Subject: Re: [PATCH v2 3/4] cachestat: implement cachestat syscall

On Mon, Dec 05, 2022 at 09:51:39AM -0800, Nhat Pham wrote:

> +	if (!access_ok(cstat, sizeof(struct cachestat)))
> +		return -EFAULT;

What for?  You are using copy_to_user() later, right?

> +	f = fdget(fd);
> +	if (f.file) {

It would be easier to read if you inverted the condition here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ