From: Stefan Schmidt <stefan@datenfreihafen.org>
To: Alexander Aring <aahringo@redhat.com>, linux-wpan@vger.kernel.org
Cc: bluetlh@gmail.com
Subject: Re: [PATCH wpan] ca8210: fix mac_len negative array access
Date: Sat, 18 Feb 2023 16:27:33 +0100 [thread overview]
Message-ID: <706b939f-8f84-6da1-38b0-9146874d19e1@datenfreihafen.org> (raw)
In-Reply-To: <20230217042504.3303396-1-aahringo@redhat.com>
Hello.
On 17.02.23 05:25, Alexander Aring wrote:
> This patch fixes a buffer overflow access of skb->data if
> ieee802154_hdr_peek_addrs() fails.
>
> Reported-by: lianhui tang <bluetlh@gmail.com>
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
> drivers/net/ieee802154/ca8210.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
> index e1a569b99e4a..0b0c6c0764fe 100644
> --- a/drivers/net/ieee802154/ca8210.c
> +++ b/drivers/net/ieee802154/ca8210.c
> @@ -1913,6 +1913,8 @@ static int ca8210_skb_tx(
> * packet
> */
> mac_len = ieee802154_hdr_peek_addrs(skb, &header);
> + if (mac_len < 0)
> + return mac_len;
>
> secspec.security_level = header.sec.level;
> secspec.key_id_mode = header.sec.key_id_mode;
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt
prev parent reply other threads:[~2023-02-18 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 4:25 [PATCH wpan] ca8210: fix mac_len negative array access Alexander Aring
2023-02-18 15:27 ` Stefan Schmidt [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=706b939f-8f84-6da1-38b0-9146874d19e1@datenfreihafen.org \
--to=stefan@datenfreihafen.org \
--cc=aahringo@redhat.com \
--cc=bluetlh@gmail.com \
--cc=linux-wpan@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).