All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryam Vargas <hexlabsecurity@proton.me>
To: Alexandra Winter <wintera@linux.ibm.com>
Cc: sashiko-reviews@lists.linux.dev,
	Hidayath Khan <hidayath@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH net] net/iucv: take a reference on the socket found in afiucv_hs_rcv()
Date: Sat, 11 Jul 2026 04:11:24 +0000	[thread overview]
Message-ID: <20260711041119.12764-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <b524ae17-9fe5-4270-bb8d-3e411ef683e5@linux.ibm.com>

Alexandra,

Agreed -- and thanks for the pointer to f558120cd709. The reference pin
closes the lookup-without-hold free in afiucv_hs_rcv(), but sashiko is
right that it doesn't touch the larger gap: the receive path changes
sk_state from softirq without honoring sock_owned_by_user(), so it still
races a process-context lock_sock(). Same class as the close-path UAF you
fixed.

I'll take a first pass. Plan is an RFC that routes the softirq state
changes through the standard sock_owned_by_user()/backlog path instead of
mutating the socket under bh_lock_sock() alone, so a held socket defers
rather than races. af_iucv is s390-only and I don't have HiperSockets
hardware -- I verify against a KASAN model of the receive path -- so I'd
rely on you or Hidayath to validate each revision on real HW before it
lands.

I'm already in this code from a separate severed-path UAF fix [1]. If
you'd rather keep the rework in-house on the s390 side, say so and I'll
send my analysis and the model instead.

[1] https://lore.kernel.org/all/20260707-b4-disp-783fedbb-v1-1-463b9dbda2ea@proton.me/

Thanks,
Bryam


  reply	other threads:[~2026-07-11  4:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06  3:24 [PATCH net] net/iucv: take a reference on the socket found in afiucv_hs_rcv() Bryam Vargas via B4 Relay
2026-07-06  3:24 ` Bryam Vargas
2026-07-07  3:24 ` sashiko-bot
2026-07-09 17:17   ` Alexandra Winter
2026-07-11  4:11     ` Bryam Vargas [this message]
2026-07-08 16:06 ` Hidayathulla Khan I
2026-07-08 16:45 ` Hidayathulla Khan I
2026-07-10 14:30 ` patchwork-bot+netdevbpf

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=20260711041119.12764-1-hexlabsecurity@proton.me \
    --to=hexlabsecurity@proton.me \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hidayath@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wintera@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.