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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190815.134230.1028411309377288636.davem@davemloft.net>
Date:   Thu, 15 Aug 2019 13:42:30 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     wenwen@...uga.edu
Cc:     rfontana@...hat.com, allison@...utok.net, alexios.zavras@...el.com,
        gregkh@...uxfoundation.org, tglx@...utronix.de,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: pch_gbe: Fix memory leaks

From: Wenwen Wang <wenwen@...uga.edu>
Date: Thu, 15 Aug 2019 16:03:39 -0400

> On Thu, Aug 15, 2019 at 3:34 PM David Miller <davem@...emloft.net> wrote:
>>
>> From: Wenwen Wang <wenwen@...uga.edu>
>> Date: Tue, 13 Aug 2019 20:33:45 -0500
>>
>> > In pch_gbe_set_ringparam(), if netif_running() returns false, 'tx_old' and
>> > 'rx_old' are not deallocated, leading to memory leaks. To fix this issue,
>> > move the free statements after the if branch.
>> >
>> > Signed-off-by: Wenwen Wang <wenwen@...uga.edu>
>>
>> Why would they be "deallocated"?  They are still assigned to
>> adapter->tx_ring and adapter->rx_ring.
> 
> 'adapter->tx_ring' and 'adapter->rx_ring' has been covered by newly
> allocated 'txdr' and 'rxdr' respectively before this if statement.

That only happens inside of the if() statement, that's why rx_old and
tx_old are only freed in that code path.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ