All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, lvc-project@linuxtesting.org,
	syzbot+b65e0af58423fc8a73aa@syzkaller.appspotmail.com
Subject: Re: [PATCH 1/3] net: sched: fix use-after-free in taprio_change()
Date: Wed, 7 Aug 2024 19:33:52 -0700	[thread overview]
Message-ID: <20240807193352.66ceaab8@kernel.org> (raw)
In-Reply-To: <20240807103943.1633950-1-dmantipov@yandex.ru>

On Wed,  7 Aug 2024 13:39:41 +0300 Dmitry Antipov wrote:
> In 'taprio_change()', 'admin' pointer may become dangling due to sched
> switch / removal caused by 'advance_sched()', and critical section
> protected by 'q->current_entry_lock' is too small to prevent from such
> a scenario (which causes use-after-free detected by KASAN). Fix this
> by prefer 'rcu_replace_pointer()' over 'rcu_assign_pointer()' to update
> 'admin' immediately before an attempt to schedule freeing.
> 
> Fixes: a3d43c0d56f1 ("taprio: Add support adding an admin schedule")
> Reported-by: syzbot+b65e0af58423fc8a73aa@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=b65e0af58423fc8a73aa
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

No need to repost (yet?) but quick process note, please err on the side
of incrementing patch versions, this should be a v2 even if only diff 
is that there are new patches. The version is for the _series_.

https://lore.kernel.org/all/20240805135145.37604-1-dmantipov@yandex.ru/

      parent reply	other threads:[~2024-08-08  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 10:39 [PATCH 1/3] net: sched: fix use-after-free in taprio_change() Dmitry Antipov
2024-08-07 10:39 ` [PATCH 2/3] net: sched: consistently use rcu_replace_pointer() " Dmitry Antipov
2024-08-07 10:39 ` [PATCH 3/3] net: sched: use RCU read-side critical section in taprio_dump() Dmitry Antipov
2024-08-08 22:09   ` Vinicius Costa Gomes
2024-08-08  2:33 ` Jakub Kicinski [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=20240807193352.66ceaab8@kernel.org \
    --to=kuba@kernel.org \
    --cc=dmantipov@yandex.ru \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+b65e0af58423fc8a73aa@syzkaller.appspotmail.com \
    --cc=vinicius.gomes@intel.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 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.