From patchwork Fri Jul 5 21:17:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Peixoto X-Patchwork-Id: 1957450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WG5w00bHsz1xr5 for ; Sat, 6 Jul 2024 07:18:07 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sPqJV-0004Lr-SA; Fri, 05 Jul 2024 21:17:53 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sPqJT-0004Ld-Kp for kernel-team@lists.ubuntu.com; Fri, 05 Jul 2024 21:17:51 +0000 Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4F8133F731 for ; Fri, 5 Jul 2024 21:17:51 +0000 (UTC) Received: by mail-io1-f72.google.com with SMTP id ca18e2360f4ac-7f639551768so252761539f.3 for ; Fri, 05 Jul 2024 14:17:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720214270; x=1720819070; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l5zQUj86Vexx6Ee+bXWs/OHCHAnvxVNKrz7Ue835xps=; b=eDDAmrDpxLXraz7l3U1R1G3NoX+hGo++fizdmTdBKjJHvkLMxYtfJTASK9hSi77wco ZmH8VNlyrBGlLJAa9+yvY0IRc27ho+etfb8EDSbm99cTWicLWeW03gT0mfnuMASfrhVo RUyZUz8OBpnt/KCZQ4JSqxTVfkMzwOaph8VoKzTX2EYKOq2HqjO2E9k2DcGs06DM8PiB ZaLqJfpX2Vcr1pGaLJ0aR+FgzQ103X4BV6Z40TamAeUscWF3H0DAImmKzaULTMpRyxZT Q+BMXcJSYg7KJnzSWrcK3mJPPFwKa0+gp/qZ3nb5fEpCVxMg0x5jrqkuEBWK/B8qS25X manw== X-Gm-Message-State: AOJu0YzU2OTbfoSTgFoFeXK0ckJi8PprNJijc8E43C36RC68b26xm26o v7zAW+3fcltIxZ2XupLmJzIO75urujj/o5gycqFaTq4HmgkMg9e4Fc1R3aP1/QBmS9jfiWi4UZ3 FJTlL+2Wmc2xse/3sax7N9j5bOL+IluB1SRx6YDuW8AeGtCgELEfWAsui/C8Ehy3ZcYPpY0ohoH gjUDoyj7CZbr+G X-Received: by 2002:a05:6e02:1aad:b0:383:290e:6937 with SMTP id e9e14a558f8ab-38398fce8a5mr64914095ab.11.1720214269752; Fri, 05 Jul 2024 14:17:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMir8suLSzDfz9bgjytyCDm0wADXGXtdxdVfa7S5hKS5MCGd0LxNvJ0SrsNyIzwSopd48uTQ== X-Received: by 2002:a05:6e02:1aad:b0:383:290e:6937 with SMTP id e9e14a558f8ab-38398fce8a5mr64913925ab.11.1720214269319; Fri, 05 Jul 2024 14:17:49 -0700 (PDT) Received: from canonical.com ([2801:8a:c811:1:9001:2cf:62b6:a60]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7080205a19fsm14447586b3a.20.2024.07.05.14.17.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 14:17:48 -0700 (PDT) From: Vinicius Peixoto To: kernel-team@lists.ubuntu.com Subject: [SRU][J/F][PATCH 0/1] ipv6: prevent NULL dereference in ip6_output() Date: Fri, 5 Jul 2024 18:17:40 -0300 Message-ID: <20240705211741.9334-1-vinicius.peixoto@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [Impact] According to syzbot, there is a chance that ip6_dst_idev() returns NULL in ip6_output(). Most places in IPv6 stack deal with a NULL idev just fine, but not here. [Backport] Due to the lack of upstream commit 5e187189ec324f78035d33a4bc123a9c4ca6f3e3 ("net: ip: add skb drop reasons for ip egress path)" Jammy, Focal, Bionic and Xenial had a context conflict. Xenial is also missing 97a7a37a7b7b ("ipv6: Initial skb->dev and skb->protocol in ip6_output"). However, none of those commits directly impact the fix or the issue, so a manual backport is appropriate here. [Test] Compile tested. [Where problems could occur] Any issues here would directly impact IPv6 networking. Eric Dumazet (1): ipv6: prevent NULL dereference in ip6_output() net/ipv6/ip6_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)