aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2026-05-12 13:33:56 +0100
committerChristian Brauner <brauner@kernel.org>2026-05-12 14:42:32 +0200
commitdbe556972100fabb8e5a1b3d2163831ff07b1e8e (patch)
treee8c326cd3392f504a69aaffa9c1f32909cd457ef /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com
parentnetfs: Fix leak of request in netfs_write_begin() error handling (diff)
netfs: Fix potential UAF in netfs_unlock_abandoned_read_pages()
netfs_unlock_abandoned_read_pages(rreq) accesses the index of the folios it is wanting to unlock and compares that to rreq->no_unlock_folio so that it doesn't unlock a folio being read for netfs_perform_write() or netfs_write_begin(). However, given that netfs_unlock_abandoned_read_pages() is called _after_ NETFS_RREQ_IN_PROGRESS is cleared, the one folio that it's not allowed to dereference is the one specified by ->no_unlock_folio as ownership immediately reverts to the caller. Fix this by storing the folio pointer instead and using that rather than the index. Also fix netfs_unlock_read_folio() where the same applies. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Closes: https://sashiko.dev/#/patchset/20260414082004.3756080-1-dhowells%40redhat.com Signed-off-by: David Howells <dhowells@redhat.com> Link: https://patch.msgid.link/20260512123404.719402-20-dhowells@redhat.com cc: Paulo Alcantara <pc@manguebit.org> cc: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> cc: Matthew Wilcox <willy@infradead.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions