Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: Sasha Levin <sashal@kernel.org>,
	stable@vger.kernel.org, kuba@kernel.org,
	linux-hams@vger.kernel.org,
	Bernard Pidoux <bernard.f6bvp@gmail.com>
Subject: Re: [stable request] ROSE memory-safety fixes for 7.0.y and earlier (merged out-of-tree in linux-netdev/mod-orphan)
Date: Fri,  4 Dec 2026 14:49:54 -0500	[thread overview]
Message-ID: <2026-12-04-1-daily-reply-0014@kernel.org> (raw)
In-Reply-To: <CAFAa3YDu=Qy8CL9BoGKo=ed=bF5j8G367vYzDVq+-f+25nSnnQ@mail.gmail.com>

> Here is v2 of 2, 11, 13 and 15 for 6.12.y and 6.18.y, numbered 1/4 to
> 4/4 in the same order.

Queued 1/4 for 6.18 and 6.12.

> 11, 13 and 15: a listening socket keeps returning -ENOTCONN, so recv()
> on a listener can no longer take a pending connection off its queue.

2/4, 3/4 and 4/4 still have a hole: the guard only tests sk_state ==
TCP_LISTEN, and a socket that was listening can leave TCP_LISTEN with its
pending connections still on sk_receive_queue. A connect() on the listening
socket does that (ax25_connect(), nr_connect() and rose_connect() set TCP_CLOSE
without checking for a listener, and any local user can call it, even one that
fails right away), and so does the bound device going down through the
*_kill_by_device() paths.  recv() then dequeues a pending connection's skb, and
that child socket is never accepted or freed.

Could you do a v3 whose guard looks at the queued skb (refuse when skb->sk !=
sk, the test the *_destroy_socket() functions already use), or that refuses
connect() on a listening socket? Fixing it in mod-orphan first would be best.

-- 
Thanks,
Sasha

  reply	other threads:[~2026-12-04 19:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15 17:21 [stable request] ROSE memory-safety fixes for 7.0.y and earlier (merged out-of-tree in linux-netdev/mod-orphan) Bernard Pidoux
2026-06-16  2:36 ` Greg KH
     [not found]   ` <CAFAa3YBciYSJxDT-SH=4oppyBS3hWUSEwJP_86EgUriJfYkjLw@mail.gmail.com>
     [not found]     ` <2026062048-posted-scarf-dcf2@gregkh>
2026-06-20 10:37       ` Bernard Pidoux
2026-06-20 10:51         ` Greg KH
2026-06-20 12:42           ` Bernard Pidoux
2026-06-25 11:04             ` Greg KH
     [not found]               ` <CAFAa3YAkgv9t==Xeh4hqTVCq3+hN1igwqWXPOu3gHmD54Wd2Kw@mail.gmail.com>
     [not found]                 ` <CAFAa3YBDK8_va32Zi3myUsEhwNs20xnejO49m_06xOo3z3cK2Q@mail.gmail.com>
     [not found]                   ` <2026093015-outmost-shrimp-45f8@gregkh>
2026-10-15 18:49                     ` Bernard Pidoux
2026-10-17  3:00                       ` Sasha Levin
2026-10-17 18:04                         ` Bernard Pidoux
2026-10-19 11:11                           ` Bernard Pidoux
2026-10-19 20:55                             ` Sasha Levin
2026-10-21 17:25                               ` Bernard Pidoux
2026-10-23 20:02                                 ` Sasha Levin
2026-10-24  9:53                                   ` Bernard Pidoux
2026-10-24 20:11                                     ` Sasha Levin
2026-10-25  9:41                                       ` Bernard Pidoux
2026-10-25 23:29                                         ` Sasha Levin
2026-11-09 10:30                                           ` Bernard Pidoux
2026-11-09 15:53                                             ` Sasha Levin
2026-11-16 11:17                                               ` Bernard Pidoux
2026-11-16 16:06                                                 ` [stable request] ROSE memory-safety fixes for 7.0.y and earlier (merged out-of-tree in linux-netdev/mod-orphan) - 10 more patches for 6.12.y/6.18.y Sasha Levin
2026-11-21 11:34                                                 ` [stable request] ROSE memory-safety fixes for 7.0.y and earlier (merged out-of-tree in linux-netdev/mod-orphan) Bernard Pidoux
2026-11-22  3:39                                                   ` Sasha Levin
2026-11-23 12:43                                                   ` Bernard Pidoux
2026-11-24  0:11                                                     ` Sasha Levin
2026-11-30 12:17                                                     ` Bernard Pidoux
2026-12-02 13:48                                                       ` Sasha Levin
2026-12-03 10:56                                                         ` Bernard Pidoux
2026-12-04 19:49                                                           ` Sasha Levin [this message]
2026-10-19 20:55                           ` Sasha Levin
2026-06-21 13:47         ` Sasha Levin

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=2026-12-04-1-daily-reply-0014@kernel.org \
    --to=sashal@kernel.org \
    --cc=bernard.f6bvp@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-hams@vger.kernel.org \
    --cc=stable@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