summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorXiyu Yang <xiyuyang19@fudan.edu.cn>2020-04-05 08:11:55 +0300
committerJohn Johansen <john.johansen@canonical.com>2020-05-22 01:25:51 +0300
commita0b845ffa0d91855532b50fc040aeb2d8338dca4 (patch)
tree5ae21032e3f1024455625f8b3af80fbf672c858a /tools/perf/scripts/python/export-to-postgresql.py
parentb85051e755b0e9d6dd8f17ef1da083851b83287d (diff)
downloadlinux-a0b845ffa0d91855532b50fc040aeb2d8338dca4.tar.xz
apparmor: fix potential label refcnt leak in aa_change_profile
aa_change_profile() invokes aa_get_current_label(), which returns a reference of the current task's label. According to the comment of aa_get_current_label(), the returned reference must be put with aa_put_label(). However, when the original object pointed by "label" becomes unreachable because aa_change_profile() returns or a new object is assigned to "label", reference count increased by aa_get_current_label() is not decreased, causing a refcnt leak. Fix this by calling aa_put_label() before aa_change_profile() return and dropping unnecessary aa_get_current_label(). Fixes: 9fcf78cca198 ("apparmor: update domain transitions that are subsets of confinement at nnp") Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions