public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: stable@vger.kernel.org, sashal@kernel.org, mkl@pengutronix.de,
	syzbot+2339c27f5c66c652843e@syzkaller.appspotmail.com
Subject: Re: [PATCH stable 5.10.y] can: isotp: stop timeout monitoring when no first frame was sent
Date: Mon, 25 Apr 2022 14:25:16 +0200	[thread overview]
Message-ID: <YmaTLEth/Thv7szN@kroah.com> (raw)
In-Reply-To: <20220425115701.2197-1-socketcan@hartkopp.net>

On Mon, Apr 25, 2022 at 01:57:01PM +0200, Oliver Hartkopp wrote:
> [ Upstream commit d73497081710c876c3c61444445512989e102152 ]
> 
> The first attempt to fix a the 'impossible' WARN_ON_ONCE(1) in
> isotp_tx_timer_handler() focussed on the identical CAN IDs created by
> the syzbot reproducer and lead to upstream fix/commit 3ea566422cbd
> ("can: isotp: sanitize CAN ID checks in isotp_bind()"). But this did
> not catch the root cause of the wrong tx.state in the tx_timer handler.
> 
> In the isotp 'first frame' case a timeout monitoring needs to be started
> before the 'first frame' is send. But when this sending failed the timeout
> monitoring for this specific frame has to be disabled too.
> 
> Otherwise the tx_timer is fired with the 'warn me' tx.state of ISOTP_IDLE.
> 
> Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol")
> Link: https://lore.kernel.org/all/20220405175112.2682-1-socketcan@hartkopp.net
> Reported-by: syzbot+2339c27f5c66c652843e@syzkaller.appspotmail.com
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  net/can/isotp.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

Now queued up, thanks.

greg k-h

      reply	other threads:[~2022-04-25 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 11:57 [PATCH stable 5.10.y] can: isotp: stop timeout monitoring when no first frame was sent Oliver Hartkopp
2022-04-25 12:25 ` 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=YmaTLEth/Thv7szN@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=mkl@pengutronix.de \
    --cc=sashal@kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+2339c27f5c66c652843e@syzkaller.appspotmail.com \
    /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