From: Qingfang Deng <dqfext@gmail.com>
To: stable@vger.kernel.org
Cc: Qingfang Deng <qingfang.deng@siflower.com.cn>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Masahide NAKAMURA <nakam@linux-ipv6.org>,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>,
Ville Nuorvala <vnuorval@tcs.hut.fi>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4.19.y] neighbour: fix unaligned access to pneigh_entry
Date: Wed, 5 Jun 2024 10:29:16 +0800 [thread overview]
Message-ID: <20240605022916.247882-1-dqfext@gmail.com> (raw)
From: Qingfang Deng <qingfang.deng@siflower.com.cn>
[ 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 <qingfang.deng@siflower.com.cn>
---
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 e58ef9e338de..4c53e51f0799 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -172,7 +172,7 @@ struct pneigh_entry {
possible_net_t net;
struct net_device *dev;
u8 flags;
- u8 key[0];
+ u32 key[0];
};
/*
--
2.34.1
next reply other threads:[~2024-06-05 2:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 2:29 Qingfang Deng [this message]
2024-06-12 13:59 ` [PATCH 4.19.y] neighbour: fix unaligned access to pneigh_entry Greg KH
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=20240605022916.247882-1-dqfext@gmail.com \
--to=dqfext@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nakam@linux-ipv6.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qingfang.deng@siflower.com.cn \
--cc=stable@vger.kernel.org \
--cc=vnuorval@tcs.hut.fi \
--cc=yoshfuji@linux-ipv6.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 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.