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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Jun 2018 08:23:54 +0200
From:   Christoph Hellwig <hch@....de>
To:     Chunyu Hu <chuhu@...hat.com>
Cc:     viro@...iv.linux.org.uk, hch@....de, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: add proc_seq_release

On Sun, Jun 10, 2018 at 03:51:24AM +0800, Chunyu Hu wrote:
> kmemleak reported some memory leak on reading proc files. After adding
> some debug lines, find that proc_seq_fops is using seq_release as
> release handler, which won't handle the free of 'private' field of
> seq_file, while in fact the open handler proc_seq_open could create
> the private data with __seq_open_private when state_size is greater
> than zero. So after reading files created with proc_create_seq_private,
> such as /proc/timer_list and /proc/vmallocinfo, the private mem of a
> seq_file is not freed. Fix it by adding the paired proc_seq_release
> as the default release handler of proc_seq_ops instead of seq_release.

Indeed, thanks for the patch.

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ