David Howells
f69aecb499
watch_queue: Actually free the watch
[ Upstream commit 3d8dcf278b ]
free_watch() does everything barring actually freeing the watch object. Fix
this by adding the missing kfree.
kmemleak produces a report something like the following. Note that as an
address can be seen in the first word, the watch would appear to have gone
through call_rcu().
BUG: memory leak
unreferenced object 0xffff88810ce4a200 (size 96):
comm "syz-executor352", pid 3605, jiffies 4294947473 (age 13.720s)
hex dump (first 32 bytes):
e0 82 48 0d 81 88 ff ff 00 00 00 00 00 00 00 00 ..H.............
80 a2 e4 0c 81 88 ff ff 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8214e6cc>] kmalloc include/linux/slab.h:581 [inline]
[<ffffffff8214e6cc>] kzalloc include/linux/slab.h:714 [inline]
[<ffffffff8214e6cc>] keyctl_watch_key+0xec/0x2e0 security/keys/keyctl.c:1800
[<ffffffff8214ec84>] __do_sys_keyctl+0x3c4/0x490 security/keys/keyctl.c:2016
[<ffffffff84493a25>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84493a25>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae
Fixes: c73be61ced ("pipe: Add general notification queue support")
Reported-and-tested-by: syzbot+6e2de48f06cdb2884bfc@syzkaller.appspotmail.com
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:10 +02:00
..
2022-03-08 19:12:40 +01:00
2022-03-02 11:47:47 +01:00
2021-05-07 00:26:34 -07:00
2021-11-18 19:17:06 +01:00
2022-04-08 14:22:45 +02:00
2021-11-25 09:49:07 +01:00
2022-02-16 12:56:41 +01:00
2021-06-22 11:07:18 -07:00
2021-11-18 19:17:14 +01:00
2021-09-02 13:00:15 -07:00
2021-08-19 12:00:24 +02:00
2022-04-08 14:22:48 +02:00
2022-04-08 14:23:07 +02:00
2021-11-25 09:48:45 +01:00
2022-03-28 09:58:45 +02:00
2022-03-08 19:12:49 +01:00
2022-01-27 11:04:08 +01:00
2022-04-08 14:22:57 +02:00
2021-05-02 00:43:35 +09:00
2021-09-08 11:50:26 -07:00
2022-02-23 12:03:07 +01:00
2021-02-23 10:25:27 -05:00
2021-08-24 18:52:36 -04:00
2020-12-03 14:58:35 +01:00
2022-02-08 18:34:03 +01:00
2022-04-08 14:23:06 +02:00
2021-03-22 15:23:32 -04:00
2022-04-08 14:23:06 +02:00
2021-01-24 14:27:16 +01:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2021-08-16 18:55:32 +02:00
2021-12-01 09:04:54 +01:00
2021-12-29 12:28:49 +01:00
2022-02-23 12:03:20 +01:00
2021-05-12 11:43:25 +02:00
2021-08-23 13:10:37 -06:00
2020-12-15 22:46:19 -08:00
2022-03-08 19:12:49 +01:00
2021-06-18 11:43:08 +02:00
2021-09-03 23:00:22 +02:00
2021-05-27 04:01:50 +09:00
2021-02-26 09:41:03 -08:00
2021-07-02 12:08:10 -07:00
2021-06-10 10:00:08 +02:00
2021-07-05 10:46:20 +02:00
2021-07-08 11:48:22 -07:00
2020-12-15 19:36:48 -08:00
2021-08-17 17:50:51 +02:00
2021-06-28 22:43:05 +02:00
2020-11-02 18:00:20 -08:00
2021-08-30 16:36:10 +02:00
2021-05-07 00:26:32 -07:00
2021-02-22 12:33:26 +00:00
2021-09-08 15:32:34 -07:00
2021-05-07 00:26:33 -07:00
2021-12-08 09:04:41 +01:00
2021-06-29 17:29:11 -07:00
2021-05-02 00:43:35 +09:00
2021-01-19 10:24:45 +01:00
2021-01-19 10:24:45 +01:00
2022-02-23 12:03:07 +01:00
2021-08-16 18:55:32 +02:00
2021-09-03 09:58:12 -07:00
2021-08-27 16:30:18 +08:00
2021-08-30 16:36:10 +02:00
2021-08-16 14:42:22 +02:00
2021-09-03 09:58:12 -07:00
2021-08-10 12:53:07 +02:00
2021-09-08 11:50:26 -07:00
2022-04-08 14:22:50 +02:00
2020-10-16 11:11:19 -07:00
2021-06-21 13:08:36 +01:00
2020-12-15 22:46:18 -08:00
2020-11-25 18:52:35 +01:00
2021-05-14 19:41:32 -07:00
2021-09-22 10:24:01 -04:00
2021-07-27 11:39:30 -07:00
2021-11-18 19:16:29 +01:00
2022-02-16 12:56:38 +01:00
2022-03-08 19:12:34 +01:00
2021-08-11 14:47:16 +02:00
2021-08-10 14:57:42 +02:00
2021-08-10 22:50:07 +02:00
2022-02-23 12:03:07 +01:00
2020-09-18 14:24:16 +01:00
2021-07-05 10:46:33 +02:00
2021-03-23 16:01:58 +01:00
2021-09-08 15:32:35 -07:00
2022-02-23 12:03:20 +01:00
2021-06-23 16:41:24 -06:00
2022-03-11 12:22:31 +01:00
2021-04-30 11:20:42 -07:00
2020-11-16 08:08:54 -08:00
2021-08-10 10:48:07 -07:00
2021-08-16 11:39:51 -04:00
2022-01-27 11:05:35 +01:00
2022-02-23 12:03:20 +01:00
2021-05-07 00:26:34 -07:00
2021-05-09 13:07:03 -07:00
2022-03-08 19:12:42 +01:00
2021-09-08 11:50:27 -07:00
2021-07-03 11:41:14 -07:00
2020-08-19 14:13:20 +02:00
2022-04-08 14:23:10 +02:00
2021-06-29 10:53:46 -07:00
2021-08-17 07:49:10 -10:00
2022-01-16 09:12:41 +01:00