<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/iucv, branch v6.18.42</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.42</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.42'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-03T09:22:03+00:00</updated>
<entry>
<title>net/iucv: fix use-after-free of a severed iucv_path</title>
<updated>2026-08-03T09:22:03+00:00</updated>
<author>
<name>Bryam Vargas</name>
<email>hexlabsecurity@proton.me</email>
</author>
<published>2026-07-07T07:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=900cd6d8119b7f3ae5c4bf82f922ff5957df43db'/>
<id>urn:sha1:900cd6d8119b7f3ae5c4bf82f922ff5957df43db</id>
<content type='text'>
commit be7cc4656eb1f54029610e82d1f0fdd3f9b5ec0a upstream.

af_iucv queues not-yet-received message notifications on iucv-&gt;message_q,
each holding a raw pointer to the connection's iucv_path.  When the peer
severs the connection, iucv_sever_path() frees that path with
iucv_path_free() but leaves the notifications queued.  A later recvmsg()
drains message_q via iucv_process_message_q() and hands the stale path to
message_receive() -- a use-after-free of the freed iucv_path.

Drop the queued notifications when the path is severed; once the path is
gone they can no longer be received.  This also frees the notifications
leaked when a socket is closed with messages still queued.

Fixes: f0703c80e515 ("[AF_IUCV]: postpone receival of iucv-packets")
Closes: https://sashiko.dev/#/patchset/20260705-b4-disp-fc79c0dc-v1-1-d2cdcb57afa9@proton.me?part=1
Cc: stable@vger.kernel.org
Signed-off-by: Bryam Vargas &lt;hexlabsecurity@proton.me&gt;
Link: https://patch.msgid.link/20260707-b4-disp-783fedbb-v1-1-463b9dbda2ea@proton.me
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/af_iucv: fix NULL deref in afiucv_hs_callback_syn()</title>
<updated>2026-08-03T09:22:03+00:00</updated>
<author>
<name>Hidayath Khan</name>
<email>hidayath@linux.ibm.com</email>
</author>
<published>2026-07-09T19:17:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33736ff5e7c97d3348ce812e8bd2e125d840743c'/>
<id>urn:sha1:33736ff5e7c97d3348ce812e8bd2e125d840743c</id>
<content type='text'>
commit 47a5116e56a6b6fe1e909f244e39cd0fc26ceee4 upstream.

afiucv_hs_callback_syn() allocates the child socket with GFP_ATOMIC.
If the allocation fails, nsk is NULL.

The connection-refused path is entered when the listen state check
fails, the accept backlog is full, or nsk is NULL. The code
unconditionally calls iucv_sock_kill(nsk) in that path.

iucv_sock_kill() does not accept a NULL socket pointer and immediately
dereferences sk via sock_flag(sk, SOCK_ZAPPED). When nsk is NULL,
calling iucv_sock_kill(nsk) results in a NULL pointer dereference.

Only call iucv_sock_kill() when a child socket was successfully
allocated.

Fixes: 3881ac441f64 ("af_iucv: add HiperSockets transport")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Signed-off-by: Hidayath Khan &lt;hidayath@linux.ibm.com&gt;
Link: https://patch.msgid.link/20260709191732.124092-1-hidayath@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/iucv: take a reference on the socket found in afiucv_hs_rcv()</title>
<updated>2026-08-03T09:21:32+00:00</updated>
<author>
<name>Bryam Vargas</name>
<email>hexlabsecurity@proton.me</email>
</author>
<published>2026-07-06T03:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c75a950e77356e526672cba4584080c6c8b793b6'/>
<id>urn:sha1:c75a950e77356e526672cba4584080c6c8b793b6</id>
<content type='text'>
[ Upstream commit 4fa349156043dc119721d067329714179f501749 ]

afiucv_hs_rcv() looks up the destination socket under iucv_sk_list.lock,
drops the lock, and then passes the socket to the afiucv_hs_callback_*()
handlers without holding a reference. AF_IUCV sockets are not
RCU-protected and are freed synchronously by iucv_sock_kill() -&gt;
sock_put(), so a concurrent close can free the socket in the window
between read_unlock() and the handler, which then dereferences freed
memory (for example sk-&gt;sk_data_ready() in afiucv_hs_callback_syn()).

Take a reference with sock_hold() while the socket is still on the list
and release it with sock_put() once the handler has run.

Fixes: 3881ac441f64 ("af_iucv: add HiperSockets transport")
Signed-off-by: Bryam Vargas &lt;hexlabsecurity@proton.me&gt;
Reviewed-by: Hidayath Khan &lt;hidayath@linux.ibm.com&gt;
Link: https://patch.msgid.link/20260705-b4-disp-fc79c0dc-v1-1-d2cdcb57afa9@proton.me
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/iucv: fix locking in .getsockopt</title>
<updated>2026-06-09T10:28:25+00:00</updated>
<author>
<name>Breno Leitao</name>
<email>leitao@debian.org</email>
</author>
<published>2026-05-21T14:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9817369243380e287ebe5525411557eaa3aa2a79'/>
<id>urn:sha1:9817369243380e287ebe5525411557eaa3aa2a79</id>
<content type='text'>
[ Upstream commit 3589d20a666caf30ad100c960a2de7de390fce88 ]

Mirror iucv_sock_setsockopt() and wrap the whole switch in
lock_sock()/release_sock(). The pre-existing SO_MSGLIMIT-only lock
becomes redundant and is removed.

Any AF_IUCV HIPER user can potentially crash the kernel by racing
recvmsg() with getsockopt(SO_MSGSIZE): the SO_MSGSIZE arm dereferences
iucv-&gt;hs_dev-&gt;mtu after iucv_sock_close() (called from the racing
recvmsg()) has set hs_dev to NULL, producing a NULL pointer dereference
oops.

Suggested-by: Stanislav Fomichev &lt;sdf.kernel@gmail.com&gt;
Fixes: 51363b8751a6 ("af_iucv: allow retrieval of maximum message size")
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Reviewed-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Tested-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Link: https://patch.msgid.link/20260521-af_iucv_fix2-v1-1-f16b1c510aa9@debian.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers</title>
<updated>2025-08-28T11:14:50+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2025-08-26T12:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f86f42ed2c471da5b061492bb8ab1d3d73c19c58'/>
<id>urn:sha1:f86f42ed2c471da5b061492bb8ab1d3d73c19c58</id>
<content type='text'>
We want to split sk-&gt;sk_drops in the future to reduce
potential contention on this field.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Kuniyuki Iwashima &lt;kuniyu@google.com&gt;
Link: https://patch.msgid.link/20250826125031.1578842-2-edumazet@google.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>s390/drivers: Explicitly include &lt;linux/export.h&gt;</title>
<updated>2025-06-17T16:18:02+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2025-06-12T12:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a56977051f2d5d91c455847bb3456d97b5d7977'/>
<id>urn:sha1:8a56977051f2d5d91c455847bb3456d97b5d7977</id>
<content type='text'>
Explicitly include &lt;linux/export.h&gt; in files which contain an
EXPORT_SYMBOL().

See commit a934a57a42f6 ("scripts/misc-check: check missing #include
&lt;linux/export.h&gt; when W=1") for more details.

Acked-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]()</title>
<updated>2025-03-04T16:18:07+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2025-02-07T14:49:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52109a067aaa96474a5b0f12aee60d73cf5f92e1'/>
<id>urn:sha1:52109a067aaa96474a5b0f12aee60d73cf5f92e1</id>
<content type='text'>
Move machine type detection to the decompressor and use static branches
to implement and use machine_is_[lpar|vm|kvm]() instead of a runtime check
via MACHINE_IS_[LPAR|VM|KVM].

Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/iucv: MSG_PEEK causes memory leak in iucv_sock_destruct()</title>
<updated>2024-11-26T09:02:53+00:00</updated>
<author>
<name>Sidraya Jayagond</name>
<email>sidraya@linux.ibm.com</email>
</author>
<published>2024-11-19T15:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebaf81317e42aa990ad20b113cfe3a7b20d4e937'/>
<id>urn:sha1:ebaf81317e42aa990ad20b113cfe3a7b20d4e937</id>
<content type='text'>
Passing MSG_PEEK flag to skb_recv_datagram() increments skb refcount
(skb-&gt;users) and iucv_sock_recvmsg() does not decrement skb refcount
at exit.
This results in skb memory leak in skb_queue_purge() and WARN_ON in
iucv_sock_destruct() during socket close. To fix this decrease
skb refcount by one if MSG_PEEK is set in order to prevent memory
leak and WARN_ON.

WARNING: CPU: 2 PID: 6292 at net/iucv/af_iucv.c:286 iucv_sock_destruct+0x144/0x1a0 [af_iucv]
CPU: 2 PID: 6292 Comm: afiucv_test_msg Kdump: loaded Tainted: G        W          6.10.0-rc7 #1
Hardware name: IBM 3931 A01 704 (z/VM 7.3.0)
Call Trace:
        [&lt;001587c682c4aa98&gt;] iucv_sock_destruct+0x148/0x1a0 [af_iucv]
        [&lt;001587c682c4a9d0&gt;] iucv_sock_destruct+0x80/0x1a0 [af_iucv]
        [&lt;001587c704117a32&gt;] __sk_destruct+0x52/0x550
        [&lt;001587c704104a54&gt;] __sock_release+0xa4/0x230
        [&lt;001587c704104c0c&gt;] sock_close+0x2c/0x40
        [&lt;001587c702c5f5a8&gt;] __fput+0x2e8/0x970
        [&lt;001587c7024148c4&gt;] task_work_run+0x1c4/0x2c0
        [&lt;001587c7023b0716&gt;] do_exit+0x996/0x1050
        [&lt;001587c7023b13aa&gt;] do_group_exit+0x13a/0x360
        [&lt;001587c7023b1626&gt;] __s390x_sys_exit_group+0x56/0x60
        [&lt;001587c7022bccca&gt;] do_syscall+0x27a/0x380
        [&lt;001587c7049a6a0c&gt;] __do_syscall+0x9c/0x160
        [&lt;001587c7049ce8a8&gt;] system_call+0x70/0x98
        Last Breaking-Event-Address:
        [&lt;001587c682c4a9d4&gt;] iucv_sock_destruct+0x84/0x1a0 [af_iucv]

Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support")
Reviewed-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Reviewed-by: Thorsten Winkler &lt;twinkler@linux.ibm.com&gt;
Signed-off-by: Sidraya Jayagond &lt;sidraya@linux.ibm.com&gt;
Signed-off-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Reviewed-by: David Wei &lt;dw@davidwei.uk&gt;
Link: https://patch.msgid.link/20241119152219.3712168-1-wintera@linux.ibm.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>s390/iucv: Fix vargs handling in iucv_alloc_device()</title>
<updated>2024-08-22T20:09:20+00:00</updated>
<author>
<name>Alexandra Winter</name>
<email>wintera@linux.ibm.com</email>
</author>
<published>2024-08-21T09:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0124fb0ebf3b0ef89892d42147c9387be3105318'/>
<id>urn:sha1:0124fb0ebf3b0ef89892d42147c9387be3105318</id>
<content type='text'>
iucv_alloc_device() gets a format string and a varying number of
arguments. This is incorrectly forwarded by calling dev_set_name() with
the format string and a va_list, while dev_set_name() expects also a
varying number of arguments.

Symptoms:
Corrupted iucv device names, which can result in log messages like:
sysfs: cannot create duplicate filename '/devices/iucv/hvc_iucv1827699952'

Fixes: 4452e8ef8c36 ("s390/iucv: Provide iucv_alloc_device() / iucv_release_device()")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1228425
Signed-off-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Reviewed-by: Thorsten Winkler &lt;twinkler@linux.ibm.com&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Link: https://patch.msgid.link/20240821091337.3627068-1-wintera@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/iucv: fix use after free in iucv_sock_close()</title>
<updated>2024-07-30T13:01:50+00:00</updated>
<author>
<name>Alexandra Winter</name>
<email>wintera@linux.ibm.com</email>
</author>
<published>2024-07-29T12:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f558120cd709682b739207b48cf7479fd9568431'/>
<id>urn:sha1:f558120cd709682b739207b48cf7479fd9568431</id>
<content type='text'>
iucv_sever_path() is called from process context and from bh context.
iucv-&gt;path is used as indicator whether somebody else is taking care of
severing the path (or it is already removed / never existed).
This needs to be done with atomic compare and swap, otherwise there is a
small window where iucv_sock_close() will try to work with a path that has
already been severed and freed by iucv_callback_connrej() called by
iucv_tasklet_fn().

Example:
[452744.123844] Call Trace:
[452744.123845] ([&lt;0000001e87f03880&gt;] 0x1e87f03880)
[452744.123966]  [&lt;00000000d593001e&gt;] iucv_path_sever+0x96/0x138
[452744.124330]  [&lt;000003ff801ddbca&gt;] iucv_sever_path+0xc2/0xd0 [af_iucv]
[452744.124336]  [&lt;000003ff801e01b6&gt;] iucv_sock_close+0xa6/0x310 [af_iucv]
[452744.124341]  [&lt;000003ff801e08cc&gt;] iucv_sock_release+0x3c/0xd0 [af_iucv]
[452744.124345]  [&lt;00000000d574794e&gt;] __sock_release+0x5e/0xe8
[452744.124815]  [&lt;00000000d5747a0c&gt;] sock_close+0x34/0x48
[452744.124820]  [&lt;00000000d5421642&gt;] __fput+0xba/0x268
[452744.124826]  [&lt;00000000d51b382c&gt;] task_work_run+0xbc/0xf0
[452744.124832]  [&lt;00000000d5145710&gt;] do_notify_resume+0x88/0x90
[452744.124841]  [&lt;00000000d5978096&gt;] system_call+0xe2/0x2c8
[452744.125319] Last Breaking-Event-Address:
[452744.125321]  [&lt;00000000d5930018&gt;] iucv_path_sever+0x90/0x138
[452744.125324]
[452744.125325] Kernel panic - not syncing: Fatal exception in interrupt

Note that bh_lock_sock() is not serializing the tasklet context against
process context, because the check for sock_owned_by_user() and
corresponding handling is missing.

Ideas for a future clean-up patch:
A) Correct usage of bh_lock_sock() in tasklet context, as described in
Link: https://lore.kernel.org/netdev/1280155406.2899.407.camel@edumazet-laptop/
Re-enqueue, if needed. This may require adding return values to the
tasklet functions and thus changes to all users of iucv.

B) Change iucv tasklet into worker and use only lock_sock() in af_iucv.

Fixes: 7d316b945352 ("af_iucv: remove IUCV-pathes completely")
Reviewed-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Signed-off-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Link: https://patch.msgid.link/20240729122818.947756-1-wintera@linux.ibm.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
</feed>
