shadowsocks / iptables

iptables is the userspace command line program used to configure the Linux 2.4.x and later packet filtering ruleset. It is targeted towards system administrators.
GNU General Public License v2.0
56 stars 63 forks source link

Possible memory leaks at nft.c #2

Open partimScurra opened 1 month ago

partimScurra commented 1 month ago

I've ran into this issue using static analyzer and can't really see memory freeing after this calloc at the __add_memory function:

https://github.com/shadowsocks/iptables/blob/67560ab12c1ff3413f971f9f1ba59ff28cb052ce/iptables/nft.c#L868-L875

Same thing here at the __add_target: https://github.com/shadowsocks/iptables/blob/67560ab12c1ff3413f971f9f1ba59ff28cb052ce/iptables/nft.c#L901-L908

info seems to be used in memcpy and nftnl_expr_set as a buffer, but is not freed afterwards.

Mygod commented 1 month ago

Hi thanks but this repo is no longer being used!