lists.openwall.net   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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aa48172d-1176-2b04-208c-296364d3a08c@nokia.com>
Date:   Tue, 19 Dec 2017 12:15:13 +0200
From:   Tommi Rantala <tommi.t.rantala@...ia.com>
To:     x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>
Subject: intel_pmu_init() extra_attr memory leak

Hi,

I'm seeing this kmemleak report in v4.15-rc4:

# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff8801f3d5d720 (size 64):
   comm "swapper/0", pid 1, jiffies 4294667312 (age 2687.423s)
   hex dump (first 32 bytes):
     60 d1 41 ad ff ff ff ff 20 d1 41 ad ff ff ff ff  `.A..... .A.....
     80 d0 41 ad ff ff ff ff 40 d0 41 ad ff ff ff ff  ..A.....@.......
   backtrace:
     [<00000000ab01886a>] intel_pmu_init+0x1844/0x1d38
     [<00000000cf20c5f0>] init_hw_perf_events+0x8c/0x66f
     [<00000000dd69189d>] do_one_initcall+0x7b/0x1d0
     [<000000008ee1f02a>] kernel_init_freeable+0x163/0x2f9
     [<00000000e32ca8d9>] kernel_init+0xf/0x120
     [<0000000038a99264>] ret_from_fork+0x24/0x30
     [<00000000ace6d26f>] 0xffffffffffffffff


$ ./scripts/faddr2line vmlinux intel_pmu_init+0x1844/0x1d38
intel_pmu_init+0x1844/0x1d38:
intel_pmu_init at arch/x86/events/intel/core.c:4296


Which matches line:
                 extra_attr = merge_attr(extra_attr, skl_format_attr);


So looks like "extra_attr" is leaked here.


"git blame" points to this commit:

commit a5df70c354c26e20d5fd8eb64517f724e97ef0b2
Author: Andi Kleen <ak@...ux.intel.com>
Date:   Tue Aug 22 11:52:00 2017 -0700

     perf/x86: Only show format attributes when supported



-Tommi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ