From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Cc: linux-can@vger.kernel.org,
Dariusz Stojaczyk <Dariusz.Stojaczyk@opensynergy.com>,
Max Staudt <max@enpas.org>
Subject: Re: [PATCH] can: dev: fix skb drop check
Date: Wed, 2 Nov 2022 11:28:29 +0100 [thread overview]
Message-ID: <ad18725f-e751-4e3f-3f99-ee6749a800c3@hartkopp.net> (raw)
In-Reply-To: <CAMZ6RqJ+q5UmFrQFKKzxHzC4pOVT0HS6vD9509Rbth_cUFkjkg@mail.gmail.com>
On 02.11.22 11:17, Vincent MAILHOL wrote:
> On Wed. 2 Nov. 2022 at19:06, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
>> In commit a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") the
>> priv->ctrlmode element is read even on virtual CAN interfaces that do not
>> create the struct can_priv at startup. This out-of-bounds read may lead to
>> CAN frame drops for virtual CAN interfaces like vcan and vxcan.
>>
>> This patch mainly reverts the original commit and adds a new helper for CAN
>> interface drivers that provide the required information in struct can_priv.
>>
>> Fixes: a6d190f8c767 ("can: skb: drop tx skb if in listen only mode")
>> Reported-by: Dariusz Stojaczyk <Dariusz.Stojaczyk@opensynergy.com>
>> Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
>> Cc: Max Staudt <max@enpas.org>
>> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>
> Cross fire... I missed your patch and sent another one. That said:
>
> Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
>
> Thank you!
:-D
Yes! I would be fine with both of them. The main difference is the
naming and the inline implementation.
So let us Marc decide ;-)
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Btw. my patch is missing the pch_can driver change which was already
removed in net-next.
Best regards,
Oliver
next prev parent reply other threads:[~2022-11-02 10:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 9:54 [PATCH] can: dev: fix skb drop check Oliver Hartkopp
2022-11-02 10:17 ` Vincent MAILHOL
2022-11-02 10:28 ` Oliver Hartkopp [this message]
2022-11-04 12:27 ` Marc Kleine-Budde
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=ad18725f-e751-4e3f-3f99-ee6749a800c3@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=Dariusz.Stojaczyk@opensynergy.com \
--cc=linux-can@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=max@enpas.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