From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A2EA35C182 for ; Sun, 22 Feb 2026 19:50:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771789824; cv=none; b=PGfltjyJRgh66WAZ99C+AJ5iogegTAQb46a4qEB9CnCC00vXnoTxbwUYJQVhlpCRCOVsaS3TOwd6WnR61cuMxkpdaW4XKyp98uy5I8qqmwzOaejeebywM6QOjlRlHm2V02OJQSDGD3Ud2zVyyJDF2gaKa2vy60NqGzwOFXMckBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771789824; c=relaxed/simple; bh=bw7cHK5nN5bBdOVPzNIhQTQlFDdU4LLOBvhwHvy+Sek=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=l0yNrE7sZEm5v4DM1oMQ0ePTsoHDHC7K3k7F5jxOgf5DVLWAAn/hlbWwxJxC4BrWUpDoe5BH22HZcEL2EUMARZdiY++CAOhlq35xWQgAHypedSCcol7X/MhsygCh/9ofKVilhbP41WUauq2IgWMqnztOn4CrESSoBxcCTVY1pnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=0F5+1h9j; arc=none smtp.client-ip=209.85.215.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--kuniyu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="0F5+1h9j" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c6e1dab2235so2234698a12.3 for ; Sun, 22 Feb 2026 11:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771789823; x=1772394623; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=na4axJXt/cUr1mORRW5n0O7My4YPvC1XtbGZHus3pls=; b=0F5+1h9jqaupf4/Ej+8lqyw0Xh8xci6ZN2oePo38Y+pSsQbVYMOhlUo/l7YX80WsRA 3FT/jTux45Jvx8J6JCvyNTGdfag89MgXNe3I3pgIp8NigwBXGtRCmcek9tcbSlNGwF5e OwIwER9v3iqpF+k1cwlYwl70BtcnxUSETtNMhBNW6tNFU5YBSl5yWVjIxI/W5cx4NMZx vrmJ+ssr0Gxtki14Wm491N835gZIG8FfPuPmNauRMaobC+FD0rZHwXA2lrIpqYYjiVug VMj80yO5CTQCghz2akQZ0AL4yI6lrZW39Ln+T2Jko/Pyxaud/KjbBQxiq/cmK1RFmZ7E phvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771789823; x=1772394623; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=na4axJXt/cUr1mORRW5n0O7My4YPvC1XtbGZHus3pls=; b=n5oI731DlJlnTYcMVzOPHxqCv+VI+Pdh0GN6APtD1psQrOxRevM+gdTyMcsD3Di909 HD/VMBnrtpM/TiN8OURopD3J9Y1jp5gJoIOPKOqTtVNgF1bkW5oIxm5bpnGdXhI3Wx/g AYOZhJGymW3rsRkc+IYDBSa40URVJR7lrLJiFGdswQFsViidVlrhbLb3OCHhSCRi+m2P Cahscq/uYS1XNfl2s/HR0pzQqN748X8Qg+OJ7Z8Ldl/YkSchijAAnTtpqC0p4DcRWDkD s55yWcnRMUhqaGsP0Z2HrmSnGeFDIxu1Z1D+v/kGfNvPLA93vEnhiZo40kgnc85495Bo +JJg== X-Forwarded-Encrypted: i=1; AJvYcCWF4ii34QKLXqOmI/fFzL2BvWHee02YFyLndG1PT+/A1oHxsT3msEnXpYK6wrgk8LiQW3lVFNo=@vger.kernel.org X-Gm-Message-State: AOJu0Yyq5EejZOBvnQNuwJ95sYDLFRrB2MLPvvqgC0FfkNLXiJg+xBNV CFx2NEKrY4U7ua5Vspa6zLKh0GNEwsfsGC1S6kJhAhmNybKqNJlfx1rWMZbX4H9VRc5AHeuZvpT /eurYDw== X-Received: from pgbfp12.prod.google.com ([2002:a05:6a02:2cec:b0:c52:a841:c79d]) (user=kuniyu job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:748b:b0:38b:e55a:97c9 with SMTP id adf61e73a8af0-39545ebb1b9mr5333025637.28.1771789822447; Sun, 22 Feb 2026 11:50:22 -0800 (PST) Date: Sun, 22 Feb 2026 19:50:04 +0000 In-Reply-To: <20260222195016.705157-1-kuniyu@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260222195016.705157-1-kuniyu@google.com> X-Mailer: git-send-email 2.53.0.371.g1d285c8824-goog Message-ID: <20260222195016.705157-3-kuniyu@google.com> Subject: [PATCH v1 net 2/2] ip6mr: Fix mr_mfc.unres.unresolved corruption in ip6mr_cache_resolve(). From: Kuniyuki Iwashima To: "David S . Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Simon Horman , Kuniyuki Iwashima , Kuniyuki Iwashima , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" mr_mfc.unres.unresolved is filled by skb_queue_tail() under spin_lock_bh(&mfc_unres_lock) in ip6mr_cache_unresolved(). ip6mr_cache_resolve() is called from ip6mr_mfc_add() after releasing the spinlock, so nothing protects the queue. Let's use skb_dequeue() instead. Fixes: 7bc570c8b4f7 ("[IPV6] MROUTE: Support multicast forwarding.") Signed-off-by: Kuniyuki Iwashima --- net/ipv6/ip6mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index e047a4680ab0..97c406e58b39 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1031,7 +1031,7 @@ static void ip6mr_cache_resolve(struct net *net, struct mr_table *mrt, * Play the pending entries through our router */ - while ((skb = __skb_dequeue(&uc->_c.mfc_un.unres.unresolved))) { + while ((skb = skb_dequeue(&uc->_c.mfc_un.unres.unresolved))) { if (ipv6_hdr(skb)->version == 0) { struct nlmsghdr *nlh = skb_pull(skb, sizeof(struct ipv6hdr)); -- 2.53.0.371.g1d285c8824-goog