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] [day] [month] [year] [list]
Message-Id: <20190220.201157.306268622139550136.davem@davemloft.net>
Date:   Wed, 20 Feb 2019 20:11:57 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     xiyou.wangcong@...il.com
Cc:     netdev@...r.kernel.org, jhs@...atatu.com, jiri@...nulli.us
Subject: Re: [Patch net-next 2/2] net_sched: fix a memory leak in
 cls_tcindex

From: Cong Wang <xiyou.wangcong@...il.com>
Date: Sat, 16 Feb 2019 10:58:27 -0800

> (cherry picked from commit 033b228e7f26b29ae37f8bfa1bc6b209a5365e9f)
> 
> When tcindex_destroy() destroys all the filter results in
> the perfect hash table, it invokes the walker to delete
> each of them. However, results with class==0 are skipped
> in either tcindex_walk() or tcindex_delete(), which causes
> a memory leak reported by kmemleak.
> 
> This patch fixes it by skipping the walker and directly
> deleting these filter results so we don't miss any filter
> result.
> 
> As a result of this change, we have to initialize exts->net
> properly in tcindex_alloc_perfect_hash(). For net-next, we
> need to consider whether we should initialize ->net in
> tcf_exts_init() instead, before that just directly test
> CONFIG_NET_CLS_ACT=y.
> 
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Cc: Jiri Pirko <jiri@...nulli.us>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ