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

2019-10-21 Thread Navid Emamdoost
On Mon, Oct 21, 2019 at 10:45 AM Tyler Hicks wrote: > > On 2019-10-21 10:23:47, 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

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

2019-10-21 Thread Tyler Hicks
On 2019-10-21 10:23:47, 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 v2] 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