All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH v2] can: bcm: prevent thrtimer UAF in rx path by checking RX_NO_AUTOTIMER
Date: Thu, 21 May 2026 12:07:08 +0100	[thread overview]
Message-ID: <20260521110708.GC2921053@google.com> (raw)
In-Reply-To: <7d21ad57-3de9-4eac-a51d-15b6dfaf3bae@hartkopp.net>

On Wed, 20 May 2026, Oliver Hartkopp wrote:
> > > Ok, thanks for the detailed explanation!
> > > 
> > > As your updated patch fixes the original patch
> > > 
> > > f1b4e32aca08 ("can: bcm: use call_rcu() instead of costly
> > > synchronize_rcu()")
> > > 
> > > we should also revert this op->flags setting that has been introduced with
> > > that patch in addition to the rcu stuff, right?
> > > 
> > > @@ -755,10 +763,13 @@ static int bcm_delete_rx_op(struct list_head *ops,
> > > struct bcm_msg_head *mh,
> > > 
> > >          list_for_each_entry_safe(op, n, ops, list) {
> > >                  if ((op->can_id == mh->can_id) && (op->ifindex == ifindex)
> > > &&
> > >                      (op->flags & CAN_FD_FRAME) == (mh->flags &
> > > CAN_FD_FRAME)) {
> > > 
> > > +                       /* disable automatic timer on frame reception */
> > > +                       op->flags |= RX_NO_AUTOTIMER;
> > > +
> > 
> > You mean from v1?  I thought that was NACKed and not applied?
> 
> No. These two lines were introduced in the original patch you aim to fix. So
> when fixing the original "use call_rcu() instead of costly
> synchronize_rcu()" patch that introduced the rcu stuff, this now obsolete
> op->flags |= RX_NO_AUTOTIMER should be removed too.

Is that not orthogonal to the fix?

If it is, would you be kind enough to submit a fix (and get your own
creds up ;-D).  This is usually something that I'd gleefully pick up,
but I'm absolutely inundated with vulnerability reports right now.

-- 
Lee Jones

  reply	other threads:[~2026-05-21 11:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 11:38 [PATCH v2] can: bcm: prevent thrtimer UAF in rx path by checking RX_NO_AUTOTIMER Oliver Hartkopp
2026-05-20 12:47 ` Lee Jones
2026-05-20 12:49   ` Lee Jones
2026-05-20 13:03     ` Oliver Hartkopp
2026-05-20 13:40       ` Lee Jones
2026-05-20 14:06         ` Lee Jones
2026-05-20 15:23           ` Oliver Hartkopp
2026-05-20 16:13             ` Lee Jones
2026-05-20 18:00               ` Oliver Hartkopp
2026-05-21 11:07                 ` Lee Jones [this message]
2026-05-21 11:35                   ` Oliver Hartkopp
2026-05-21 13:51                     ` Lee Jones
2026-05-21 17:57                       ` Oliver Hartkopp
2026-05-20 12:59   ` Oliver Hartkopp

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=20260521110708.GC2921053@google.com \
    --to=lee@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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.