B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH RFC batadv] batman-adv: mcast: fix use-after-free in orig_node RCU release
Date: Sun, 17 May 2026 19:55:56 +0200	[thread overview]
Message-ID: <agoBLITjEyVPScvd@sellars> (raw)
In-Reply-To: <5073295.GXAFRqVoOG@sven-l14>

On Sun, May 17, 2026 at 06:54:09PM +0200, Sven Eckelmann wrote:
> But this looks super RCU-like (without locks):
> 
> static int
> batadv_mcast_forw_want_all_ipv4(struct batadv_priv *bat_priv,
> 				struct sk_buff *skb, unsigned short vid)
> {
> 	struct batadv_orig_node *orig_node;
> 	int ret = NET_XMIT_SUCCESS;
> 	struct sk_buff *newskb;
> 
> 	rcu_read_lock();
> 	hlist_for_each_entry_rcu(orig_node,
> 				 &bat_priv->mcast.want_all_ipv4_list,
> 				 mcast_want_all_ipv4_node) {
> [..]
> 	}
> 	rcu_read_unlock();
> 	return ret;
> }

Ah, no, you're absolutely right, I mixed it up!

Maybe this might make more sense as a fixes line then, though?

Fixes: 500ea14940f8 ("batman-adv: Add multicast-to-unicast support for multiple targets")


I think before that commit we only used these atomic counters in
fast path?

  reply	other threads:[~2026-05-17 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 17:41 [PATCH RFC batadv] batman-adv: mcast: fix use-after-free in orig_node RCU release Sven Eckelmann
2026-05-17 16:38 ` Linus Lüssing
2026-05-17 16:54   ` Sven Eckelmann
2026-05-17 17:55     ` Linus Lüssing [this message]
2026-05-17 18:08       ` Sven Eckelmann
2026-05-17 21:08 ` Linus Lüssing

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=agoBLITjEyVPScvd@sellars \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=sven@narfation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox