From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Julian Anastasov <ja@ssi.bg>
Cc: Simon Horman <horms@verge.net.au>,
lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net] ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service
Date: Thu, 27 May 2021 13:07:35 +0200 [thread overview]
Message-ID: <20210527110735.GA6710@salvia> (raw)
In-Reply-To: <20210524195457.125514-1-ja@ssi.bg>
On Mon, May 24, 2021 at 10:54:57PM +0300, Julian Anastasov wrote:
> syzbot reported memory leak [1] when adding service with
> HASHED flag. We should ignore this flag both from sockopt
> and netlink provided data, otherwise the service is not
> hashed and not visible while releasing resources.
>
> [1]
> BUG: memory leak
> unreferenced object 0xffff888115227800 (size 512):
> comm "syz-executor263", pid 8658, jiffies 4294951882 (age 12.560s)
> hex dump (first 32 bytes):
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> backtrace:
> [<ffffffff83977188>] kmalloc include/linux/slab.h:556 [inline]
> [<ffffffff83977188>] kzalloc include/linux/slab.h:686 [inline]
> [<ffffffff83977188>] ip_vs_add_service+0x598/0x7c0 net/netfilter/ipvs/ip_vs_ctl.c:1343
> [<ffffffff8397d770>] do_ip_vs_set_ctl+0x810/0xa40 net/netfilter/ipvs/ip_vs_ctl.c:2570
> [<ffffffff838449a8>] nf_setsockopt+0x68/0xa0 net/netfilter/nf_sockopt.c:101
> [<ffffffff839ae4e9>] ip_setsockopt+0x259/0x1ff0 net/ipv4/ip_sockglue.c:1435
> [<ffffffff839fa03c>] raw_setsockopt+0x18c/0x1b0 net/ipv4/raw.c:857
> [<ffffffff83691f20>] __sys_setsockopt+0x1b0/0x360 net/socket.c:2117
> [<ffffffff836920f2>] __do_sys_setsockopt net/socket.c:2128 [inline]
> [<ffffffff836920f2>] __se_sys_setsockopt net/socket.c:2125 [inline]
> [<ffffffff836920f2>] __x64_sys_setsockopt+0x22/0x30 net/socket.c:2125
> [<ffffffff84350efa>] do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
> [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae
Applied, thanks.
prev parent reply other threads:[~2021-05-27 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 19:54 [PATCH net] ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service Julian Anastasov
2021-05-25 10:30 ` Simon Horman
2021-05-27 11:07 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210527110735.GA6710@salvia \
--to=pablo@netfilter.org \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).