From: Greg KH <greg@kroah.com>
To: Qingfang Deng <dqfext@gmail.com>
Cc: stable@vger.kernel.org,
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: Re: [PATCH 4.19.y] neighbour: fix unaligned access to pneigh_entry
Date: Wed, 12 Jun 2024 15:59:39 +0200 [thread overview]
Message-ID: <2024061231-most-blinker-c31c@gregkh> (raw)
In-Reply-To: <20240605022916.247882-1-dqfext@gmail.com>
On Wed, Jun 05, 2024 at 10:29:16AM +0800, Qingfang Deng wrote:
> 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
>
>
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2024-06-12 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 2:29 [PATCH 4.19.y] neighbour: fix unaligned access to pneigh_entry Qingfang Deng
2024-06-12 13:59 ` Greg KH [this message]
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=2024061231-most-blinker-c31c@gregkh \
--to=greg@kroah.com \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).