Re: [PATCH v3] apparmor: Fix use-after-free in aa_audit_rule_init

2019-10-21 Thread Tyler Hicks
On 2019-10-21 11:05:31, Navid Emamdoost wrote: > In the implementation of aa_audit_rule_init(), when aa_label_parse() > fails the allocated memory for rule is released using > aa_audit_rule_free(). But after this release, the return statement > tries to access the label field of the rule which

[PATCH v3] apparmor: Fix use-after-free in aa_audit_rule_init

2019-10-21 Thread Navid Emamdoost
In the implementation of aa_audit_rule_init(), when aa_label_parse() fails the allocated memory for rule is released using aa_audit_rule_free(). But after this release, the return statement tries to access the label field of the rule which results in use-after-free. Before releasing the rule, copy