lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 22 Apr 2019 11:32:44 -0400
From:   Paul Moore <>
To:     Wenwen Wang <>
Cc:     Eric Paris <>,
        "moderated list:AUDIT SUBSYSTEM" <>,
        open list <>
Subject: Re: [PATCH v3] audit: fix a memory leak bug

On Fri, Apr 19, 2019 at 9:49 PM Wenwen Wang <> wrote:
> 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
> Signed-off-by: Wenwen Wang <>
> ---
>  kernel/auditfilter.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Merged into audit/next - thanks!

paul moore

Powered by blists - more mailing lists