All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] watch_queue: A couple more fixes
@ 2022-03-21 13:00 David Howells
  2022-03-21 13:00 ` [PATCH 1/2] watch_queue: Fix NULL dereference in error cleanup David Howells
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Howells @ 2022-03-21 13:00 UTC (permalink / raw)
  To: torvalds; +Cc: dhowells, fmdefrancesco, jannh, keyrings, linux-kernel


Hi Linus,

Here are fixes for a couple more watch_queue bugs, both found by syzbot:

 (1) Fix error cleanup in watch_queue_set_size() where it tries to clean up
     all the pointers in the page list, even if they've not been allocated
     yet[1].  Unfortunately, __free_page() doesn't treat a NULL pointer as
     being "do nothing".

     A second report[2] looks like it's probably the same bug, but on arm64
     rather than x86_64, but there's no reproducer.

 (2) Fix a missing kfree in free_watch() to actually free the watch[3].

Both have syzbot reproducers.

The fixes are also available through git:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-fixes

David

Link: https://lore.kernel.org/r/000000000000b1807c05daad8f98@google.com/ [1]
Link: https://lore.kernel.org/r/000000000000035b9c05daae8a5e@google.com/ [2]
Link: https://lore.kernel.org/r/000000000000bc8eaf05dab91c63@google.com/ [3]
---
David Howells (2):
      watch_queue: Fix NULL dereference in error cleanup
      watch_queue: Actually free the watch


 kernel/watch_queue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-22  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 13:00 [PATCH 0/2] watch_queue: A couple more fixes David Howells
2022-03-21 13:00 ` [PATCH 1/2] watch_queue: Fix NULL dereference in error cleanup David Howells
2022-03-21 13:00 ` [PATCH 2/2] watch_queue: Actually free the watch David Howells
2022-03-22  4:00 ` [PATCH 0/2] watch_queue: A couple more fixes Linus Torvalds
2022-03-22  9:55 ` David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.