This is a note to let you know that I've just added the patch titled fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fs-ntfs3-fix-possible-null-ptr-deref-in-ni_readpage_.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 5022470ecff3f1bc736d3606fd84fc27d163947a Author: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx> Date: Tue Sep 26 11:19:08 2023 +0300 fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() [ Upstream commit 32e9212256b88f35466642f9c939bb40cfb2c2de ] Signed-off-by: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 73a56d7ac84b7..b02778cbb1d34 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2100,7 +2100,7 @@ int ni_readpage_cmpr(struct ntfs_inode *ni, struct page *page) for (i = 0; i < pages_per_frame; i++) { pg = pages[i]; - if (i == idx) + if (i == idx || !pg) continue; unlock_page(pg); put_page(pg);