Wenwen Wang
70c4cf17e4
audit: fix a memory leak bug
...
In audit_rule_change(), audit_data_to_entry() is firstly invoked to
translate the payload data to the kernel's rule representation. In
audit_data_to_entry(), depending on the audit field type, an audit tree may
be created in audit_make_tree(), which eventually invokes kmalloc() to
allocate the tree. Since this tree is a temporary tree, it will be then
freed in the following execution, e.g., audit_add_rule() if the message
type is AUDIT_ADD_RULE or audit_del_rule() if the message type is
AUDIT_DEL_RULE. However, if the message type is neither AUDIT_ADD_RULE nor
AUDIT_DEL_RULE, i.e., the default case of the switch statement, this
temporary tree is not freed.
To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE
or AUDIT_DEL_RULE.
Signed-off-by: Wenwen Wang <wang6495@umn.edu >
Reviewed-by: Richard Guy Briggs <rgb@redhat.com >
Signed-off-by: Paul Moore <paul@paul-moore.com >
2019-04-22 11:22:03 -04:00
..
2019-03-11 08:54:01 -07:00
2019-03-12 14:08:19 -07:00
2018-10-24 20:55:56 -04:00
2018-12-30 08:31:52 +00:00
2019-03-12 10:04:02 -07:00
2019-03-11 17:01:32 -07:00
2019-03-07 18:32:02 -08:00
2019-03-08 10:09:53 -08:00
2019-03-05 15:56:59 +01:00
2019-03-09 14:15:51 +01:00
2019-03-12 10:04:02 -07:00
2019-03-15 14:22:59 -07:00
2019-03-06 07:59:36 -08:00
2019-03-06 10:31:36 -08:00
2019-04-15 18:14:01 -04:00
2019-03-16 12:36:39 -07:00
2019-03-07 18:32:02 -08:00
2018-01-04 16:45:09 -08:00
2019-01-31 14:20:54 +01:00
2019-01-18 17:53:29 -05:00
2019-01-14 18:01:05 -05:00
2019-01-18 17:53:29 -05:00
2019-03-20 20:57:48 -04:00
2019-02-07 21:44:27 -05:00
2019-04-22 11:22:03 -04:00
2019-04-15 18:14:01 -04:00
2018-10-31 08:54:14 -07:00
2019-01-25 11:22:43 -08:00
2019-02-07 00:13:27 +01:00
2019-03-07 18:32:02 -08:00
2019-02-04 08:57:24 +01:00
2019-03-05 21:07:14 -08:00
2019-01-08 13:18:44 -08:00
2018-10-26 16:26:32 -07:00
2018-05-16 07:23:35 +02:00
2018-05-16 07:23:35 +02:00
2019-03-07 10:11:41 -08:00
2018-02-21 16:54:06 +01:00
2018-10-31 08:54:12 -07:00
2019-03-09 15:53:03 -08:00
2018-08-06 12:35:20 +02:00
2019-03-06 07:17:17 -08:00
2017-12-14 16:00:49 -08:00
2019-03-07 18:31:59 -08:00
2018-05-15 23:08:33 -07:00
2018-01-08 19:43:15 +01:00
2019-01-06 09:46:51 +09:00
2019-01-21 17:38:56 -03:00
2019-02-01 20:55:38 +01:00
2018-12-15 17:44:35 +09:00
2019-03-07 18:32:02 -08:00
2018-12-28 12:11:47 -08:00
2018-12-06 14:38:50 +00:00
2018-07-16 12:31:57 -07:00
2019-02-13 08:16:40 +01:00
2019-03-06 10:31:36 -08:00
2019-03-07 18:32:02 -08:00
2018-12-28 12:11:52 -08:00
2018-11-07 14:41:41 +01:00
2018-07-02 11:36:17 +02:00
2019-03-07 18:32:00 -08:00
2018-11-16 14:11:04 +08:00
2019-03-07 18:31:59 -08:00
2018-04-11 10:28:37 -07:00
2018-09-16 16:08:25 +02:00
2018-12-28 12:42:30 -08:00
2018-10-31 08:54:16 -07:00
2019-01-03 18:57:57 -08:00
2018-09-11 16:13:24 +01:00
2019-03-12 13:27:20 -07:00
2019-03-16 13:05:32 -07:00
2019-01-03 18:57:57 -08:00
2019-03-20 21:12:36 -04:00
2019-03-16 13:47:14 -07:00
2019-01-30 19:27:00 +01:00
2018-07-03 09:20:44 +02:00
2019-02-10 21:51:39 +01:00
2018-12-05 19:31:44 -08:00
2018-08-13 11:25:07 -07:00
2019-03-16 13:47:14 -07:00
2019-03-07 19:25:37 -08:00
2019-01-04 13:13:47 -08:00
2019-03-12 10:04:00 -07:00
2017-12-17 13:57:15 +01:00
2018-02-06 18:32:46 -08:00
2018-06-21 12:33:05 +02:00
2019-02-09 08:47:52 -08:00
2018-11-27 09:21:41 -08:00
2018-04-05 21:36:27 -07:00
2018-04-02 20:15:59 +02:00
2018-04-02 20:15:30 +02:00
2019-01-11 18:05:40 -08:00
2018-10-09 16:51:11 +02:00
2018-11-07 23:51:16 -06:00
2018-08-22 10:52:47 -07:00
2018-08-11 02:05:53 -05:00
2018-04-11 10:28:35 -07:00
2018-08-30 12:56:40 +02:00
2018-11-01 14:33:35 +01:00
2019-02-01 15:46:23 -08:00
2019-03-10 13:48:14 -07:00