Shu Wang
b0659ae5e3
audit: fix memleak in auditd_send_unicast_skb.
Found this issue by kmemleak report, auditd_send_unicast_skb
did not free skb if rcu_dereference(auditd_conn) returns null.
unreferenced object 0xffff88082568ce00 (size 256):
comm "auditd", pid 1119, jiffies 4294708499
backtrace:
[<ffffffff8176166a>] kmemleak_alloc+0x4a/0xa0
[<ffffffff8121820c>] kmem_cache_alloc_node+0xcc/0x210
[<ffffffff8161b99d>] __alloc_skb+0x5d/0x290
[<ffffffff8113c614>] audit_make_reply+0x54/0xd0
[<ffffffff8113dfa7>] audit_receive_msg+0x967/0xd70
----------------
(gdb) list *audit_receive_msg+0x967
0xffffffff8113dff7 is in audit_receive_msg (kernel/audit.c:1133).
1132 skb = audit_make_reply(0, AUDIT_REPLACE, 0,
0, &pvnr, sizeof(pvnr));
---------------
[<ffffffff8113e402>] audit_receive+0x52/0xa0
[<ffffffff8166c561>] netlink_unicast+0x181/0x240
[<ffffffff8166c8e2>] netlink_sendmsg+0x2c2/0x3b0
[<ffffffff816112e8>] sock_sendmsg+0x38/0x50
[<ffffffff816117a2>] SYSC_sendto+0x102/0x190
[<ffffffff81612f4e>] SyS_sendto+0xe/0x10
[<ffffffff8176d337>] entry_SYSCALL_64_fastpath+0x1a/0xa5
[<ffffffffffffffff>] 0xffffffffffffffff
Signed-off-by: Shu Wang <shuwang@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2017-07-19 10:28:54 -04:00
..
2017-04-17 15:51:57 -04:00
2017-04-16 11:48:10 -07:00
2017-02-27 18:43:46 -08:00
2017-03-02 08:42:34 +01:00
2017-03-17 13:59:52 -07:00
2017-04-20 16:03:09 +02:00
2017-04-18 13:11:07 -07:00
2017-03-03 10:16:38 -08:00
2017-03-02 08:42:36 +01:00
2017-03-02 08:42:34 +01:00
2017-04-27 09:08:26 +02:00
2017-03-07 14:45:22 -08:00
2017-04-19 21:23:47 -04:00
2017-03-02 08:42:39 +01:00
2017-05-02 10:16:04 -04:00
2017-05-02 10:16:04 -04:00
2017-05-02 10:16:05 -04:00
2017-07-19 10:28:54 -04:00
2017-06-12 18:07:43 -04:00
2017-05-02 10:16:05 -04:00
2017-05-30 17:36:11 -04:00
2017-01-12 07:01:56 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-03-14 19:19:27 +01:00
2017-03-02 08:42:28 +01:00
2017-03-02 08:42:39 +01:00
2017-03-09 17:01:09 -08:00
2017-02-22 10:15:09 -08:00
2017-03-03 01:43:46 +01:00
2016-12-24 11:46:01 -08:00
2017-03-14 21:45:36 +01:00
2016-12-24 11:46:01 -08:00
2017-03-02 08:42:34 +01:00
2017-02-27 13:26:17 -08:00
2017-02-17 13:40:05 -05:00
2016-10-25 11:31:51 +02:00
2016-12-20 09:48:47 -08:00
2017-02-22 17:33:34 -08:00
2017-03-10 20:55:09 +01:00
2017-03-10 20:55:09 +01:00
2017-03-02 08:42:39 +01:00
2017-02-22 10:30:38 -08:00
2017-02-24 17:46:56 -08:00
2017-03-17 10:18:47 -04:00
2017-03-02 08:42:39 +01:00
2016-12-27 14:49:05 -05:00
2017-01-23 11:32:16 -08:00
2017-03-16 16:56:18 -07:00
2017-05-02 10:16:04 -04:00
2017-02-24 17:46:56 -08:00
2017-03-24 21:51:33 +08:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:37 +01:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2017-04-08 00:47:48 -07:00
2017-02-27 18:43:47 -08:00
2017-03-02 08:42:36 +01:00
2017-03-02 08:42:39 +01:00
2017-03-02 08:42:26 +01:00
2017-03-02 08:42:35 +01:00
2016-10-21 15:45:47 -06:00
2017-02-08 08:21:31 +01:00
2016-11-16 10:15:09 +01:00
2016-12-22 22:58:37 -05:00
2017-03-02 08:42:39 +01:00
2016-12-14 16:04:07 -08:00
2017-04-08 10:27:40 -07:00
2016-11-15 10:54:36 -05:00
2017-03-02 08:42:27 +01:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2017-03-06 15:26:37 -06:00
2017-03-02 08:42:31 +01:00
2017-03-02 08:42:29 +01:00
2017-03-02 08:42:29 +01:00
2017-03-03 01:45:36 +01:00
2017-03-02 08:42:38 +01:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:34 +01:00
2017-03-06 15:33:42 -05:00