Linux-SCTP Archive mirror
 help / color / mirror / Atom feed
From: Sishuai Gong <sishuai.system@gmail.com>
To: marcelo.leitner@gmail.com, lucien.xin@gmail.com
Cc: linux-sctp@vger.kernel.org
Subject: Racy addr->valid in sctp_inet6addr_event() and sctp_copy_laddrs()
Date: Tue, 8 Aug 2023 15:07:08 -0400	[thread overview]
Message-ID: <72339335-4072-429C-9494-ACCDC5572F54@gmail.com> (raw)

Hello,

We observed a data race over addr->valid between sctp_inet6addr_event() and 
sctp_copy_laddrs(). Under the following execution order, sctp_copy_laddrs()
might copy the addr that is no longer valid.

sctp_copy_laddrs()              sctp_inet6addr_event()
if (!addr->valid)
        continue;
                                		addr->valid = 0;
memcpy(&temp, &addr->a, sizeof(temp));

Thanks

             reply	other threads:[~2023-08-08 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 19:07 Sishuai Gong [this message]
2023-08-09 16:26 ` Racy addr->valid in sctp_inet6addr_event() and sctp_copy_laddrs() 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=72339335-4072-429C-9494-ACCDC5572F54@gmail.com \
    --to=sishuai.system@gmail.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).