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: <ZvrqotTfw06vAK9Y@casper.infradead.org>
Date: Mon, 30 Sep 2024 19:14:58 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Gianfranco Trad <gianf.trad@...il.com>
Cc: akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	skhan@...uxfoundation.org,
	syzbot+4089e577072948ac5531@...kaller.appspotmail.com
Subject: Re: [PATCH v2] Fix NULL pointer dereference in read_cache_folio

On Mon, Sep 30, 2024 at 11:02:26AM +0200, Gianfranco Trad wrote:
> @@ -2360,6 +2360,8 @@ static int filemap_read_folio(struct file *file, filler_t filler,
>  	/* Start the actual read. The read will unlock the page. */
>  	if (unlikely(workingset))
>  		psi_memstall_enter(&pflags);
> +	if (!filler)
> +		return -EIO;

This is definitely wrong because you enter memstall, but do not exit it.

As Andrew says, the underlying problem is that the filesystem does not
implement ->read_folio.  Which filesystem is this?

>  	error = filler(file, folio);
>  	if (unlikely(workingset))
>  		psi_memstall_leave(&pflags);
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ