Re: [PATCH net v3 2/3] sctp: Prevent TOCTOU out-of-bounds write

Kuniyuki Iwashima <[email protected]>
Newsgroups org.kernel.vger.linux-sctp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <CAAVpQUBaJMNCOZtzEcUUT80XmZsj+w8CZDe1C08FudjXJFPT6A@mail.gmail.com>
On Tue, Oct 28, 2025 at 9:15 AM Stefan Wiehler <[email protected]> wrote:
>
> For the following path not holding the sock lock,
>
>   sctp_diag_dump() -> sctp_for_each_endpoint() -> sctp_ep_dump()
>
> make sure not to exceed bounds in case the address list has grown
> between buffer allocation (time-of-check) and write (time-of-use).
>
> Suggested-by: Kuniyuki Iwashima <[email protected]>
> Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file")
> Signed-off-by: Stefan Wiehler <[email protected]>

Reviewed-by: Kuniyuki Iwashima <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.