From: Jakub Kicinski <kuba@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Xin Long <lucien.xin@gmail.com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
lvc-project@linuxtesting.org,
syzbot+8bb053b5d63595ab47db@syzkaller.appspotmail.com
Subject: Re: [PATCH] net: sctp: fix skb leak in sctp_inq_free()
Date: Fri, 9 Feb 2024 13:47:03 -0800 [thread overview]
Message-ID: <20240209134703.63a9167b@kernel.org> (raw)
In-Reply-To: <20240206092619.74018-1-dmantipov@yandex.ru>
On Tue, 6 Feb 2024 12:26:17 +0300 Dmitry Antipov wrote:
> In case of GSO, 'chunk->skb' pointer may point to an entry from
> fraglist created in 'sctp_packet_gso_append()'. To avoid freeing
> random fraglist entry (and so undefined behavior and/or memory
> leak), ensure that 'chunk->skb' is set to 'chunk->head_skb'
> (i.e. fraglist head) before calling 'sctp_chunk_free()'.
The code already exists in another place in this file, let's factor it
out to a helper function.
--
pw-bot: cr
next prev parent reply other threads:[~2024-02-09 21:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 17:01 [PATCH] net: sctp: fix memory leak in sctp_chunk_destroy() Dmitry Antipov
2024-02-05 23:29 ` Xin Long
2024-02-06 5:15 ` [lvc-project] " Antipov, Dmitriy
2024-02-06 9:26 ` [PATCH] net: sctp: fix skb leak in sctp_inq_free() Dmitry Antipov
2024-02-09 21:47 ` Jakub Kicinski [this message]
2024-02-12 8:22 ` [PATCH] [v2] " Dmitry Antipov
2024-02-13 0:25 ` Jakub Kicinski
2024-02-13 15:21 ` Xin Long
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=20240209134703.63a9167b@kernel.org \
--to=kuba@kernel.org \
--cc=dmantipov@yandex.ru \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=lvc-project@linuxtesting.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=syzbot+8bb053b5d63595ab47db@syzkaller.appspotmail.com \
/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 NNTP newsgroup(s).