Re: [iptables PATCH] xshared: fix memory leak in should_load_proto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christian,

On Mon, May 29, 2023 at 07:18:46PM +0200, Christian Marangi wrote:
> With the help of a Coverity Scan, it was pointed out that it's present a
> memory leak in the corner case where find_proto is not NULL in the
> function should_load_proto. find_proto return a struct xtables_match
> pointer from xtables_find_match that is allocated but never freed.
> 
> Correctly free the found proto in the corner case where find_proto
> succeed.

We have a '--valgrind' mode in shell testsuite and this has not been
identified yet. So assuming your finding is correct, we lack a proper
test case. Can you provide a reproducer (ideally as shell test-case)?

Also I wonder if we can provide a Fixes: tag. The code in question is
very old, so maybe hard to find.

Thanks, Phil



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux