All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: omeux <omeux327@gmail.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	security@kernel.org, linux-sctp@vger.kernel.org
Subject: Re: Subject: [SECURITY] sctp: diag: uninit kernel stack leak via INET_DIAG_LOCALS/PEERS
Date: Tue, 14 Jul 2026 08:29:10 +0200	[thread overview]
Message-ID: <2026071410-concerned-tremble-4cc4@gregkh> (raw)
In-Reply-To: <CAG245UPnx9BOWdG7EMh6jQrHeShjRZYaPM_ah_sMPeN82U+gpA@mail.gmail.com>

On Tue, Jul 14, 2026 at 02:19:00PM +0800, omeux wrote:
> 5. Suggested fix
> ---------------------------------------------------------------
>    - Suspected location: net/sctp/diag.c inet_diag_msg_sctpladdrs_fill()
>      and inet_diag_msg_sctpaddrs_fill(); the uninit source is in
>      net/sctp/protocol.c sctp_v4_from_skb()/sctp_v4_from_addr_param().
>    - Proposed and tested fix: zero the full sockaddr_storage slot first,
>      then copy only the actually-initialized length of the address
>      (sizeof(struct sockaddr_in) for AF_INET, sizeof(union sctp_addr)
>      otherwise) so the uninitialized tail never reaches userspace.
> 
>        Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file")
>        Cc: stable@vger.kernel.org
>        Signed-off-by: Your Name <you@example.com>

Please turn this into a patch that can be applied, and properly use your
name and the Assisted-by: tag showing that you used an LLM for this
thing, so that it can be considered as a real patch.

Also, when cc:ing a public mailing list, no need to get
security@kernel.org involved.

thanks,

greg k-h

           reply	other threads:[~2026-07-14  6:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAG245UPnx9BOWdG7EMh6jQrHeShjRZYaPM_ah_sMPeN82U+gpA@mail.gmail.com>]

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=2026071410-concerned-tremble-4cc4@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=omeux327@gmail.com \
    --cc=security@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.