From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E85E5C7EE2E for ; Mon, 12 Jun 2023 10:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234185AbjFLKtY (ORCPT ); Mon, 12 Jun 2023 06:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234292AbjFLKsz (ORCPT ); Mon, 12 Jun 2023 06:48:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AACF25FD8 for ; Mon, 12 Jun 2023 03:33:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E941F614F0 for ; Mon, 12 Jun 2023 10:33:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08969C433EF; Mon, 12 Jun 2023 10:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686565994; bh=3a3S7E//5RGg3AIUfWREo/KfaGDdWdkOow4ZzeCJryo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=grUI7REJWYpDldmSclnVtR2A7SCxhc8GDROg3Zlr8FHk7oVmMfOOTt7mzoRqkTWrm Jg44QICVHZ+aN0pLtgqIM6haVLNa95VFAb1Orw31I0fADAwR34X4L/VIdHCIyQdeYm ccngs0M4/140a4rT5edZuSeGbwHEF9uIgeRG/hO8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Qingfang DENG , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 16/68] neighbour: fix unaligned access to pneigh_entry Date: Mon, 12 Jun 2023 12:26:08 +0200 Message-ID: <20230612101659.139958640@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612101658.437327280@linuxfoundation.org> References: <20230612101658.437327280@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Qingfang DENG [ Upstream commit ed779fe4c9b5a20b4ab4fd6f3e19807445bb78c7 ] After the blamed commit, the member key is longer 4-byte aligned. On platforms that do not support unaligned access, e.g., MIPS32R2 with unaligned_action set to 1, this will trigger a crash when accessing an IPv6 pneigh_entry, as the key is cast to an in6_addr pointer. Change the type of the key to u32 to make it aligned. Fixes: 62dd93181aaa ("[IPV6] NDISC: Set per-entry is_router flag in Proxy NA.") Signed-off-by: Qingfang DENG Link: https://lore.kernel.org/r/20230601015432.159066-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- include/net/neighbour.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/neighbour.h b/include/net/neighbour.h index d5767e25509cc..abb22cfd4827f 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -174,7 +174,7 @@ struct pneigh_entry { struct net_device *dev; u8 flags; u8 protocol; - u8 key[]; + u32 key[]; }; /* -- 2.39.2