Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Adriano Cordova <adrianox@gmail.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-usb@vger.kernel.org, linux-serial@vger.kernel.org,
	syzbot+473d7477c523b41d4046@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 0/2] tty: fix break race
Date: Thu, 3 Sep 2026 08:22:48 +0200	[thread overview]
Message-ID: <apkSOF1l7VYTpzul@hovoldconsulting.com> (raw)
In-Reply-To: <20260903042429.130320-1-adrianox@gmail.com>

On Thu, Sep 03, 2026 at 12:24:27AM -0400, Adriano Cordova wrote:
> A timed break (TCSBRK/TCSBRKP) and the unconditional TIOCSBRK/TIOCCBRK
> can race against USB disconnect and call break_ctl() after the device is
> gone, dereferencing freed port data in keyspan_break_ctl().
> 
> Both patches are needed: the tty core must not issue break_ctl() to a
> hung-up tty, and serial_break() must not call the driver after
> disconnect. This is the same two-layer protection read and write already
> use.

This doesn't work and as I said in my reply to the syzbot report I'm
preparing a proper fix.

Johan

      parent reply	other threads:[~2026-09-03  6:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  4:24 [PATCH v2 0/2] tty: fix break race Adriano Cordova
2026-09-03  4:24 ` [PATCH v2 1/2] USB: serial: fix break_ctl() NULL-pointer dereference Adriano Cordova
2026-09-03  4:41   ` sashiko-bot
2026-09-03  4:24 ` [PATCH v2 2/2] tty: fix break race Adriano Cordova
2026-09-03  4:40   ` sashiko-bot
2026-09-03  6:22 ` Johan Hovold [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=apkSOF1l7VYTpzul@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=adrianox@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=syzbot+473d7477c523b41d4046@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