linux/net/rxrpc
Pengpeng Hou a44ce6aa2e rxrpc: proc: size address buffers for %pISpc output
The AF_RXRPC procfs helpers format local and remote socket addresses into
fixed 50-byte stack buffers with "%pISpc".

That is too small for the longest current-tree IPv6-with-port form the
formatter can produce. In lib/vsprintf.c, the compressed IPv6 path uses a
dotted-quad tail not only for v4mapped addresses, but also for ISATAP
addresses via ipv6_addr_is_isatap().

As a result, a case such as

  [ffff:ffff:ffff:ffff:0:5efe:255.255.255.255]:65535

is possible with the current formatter. That is 50 visible characters, so
51 bytes including the trailing NUL, which does not fit in the existing
char[50] buffers used by net/rxrpc/proc.c.

Size the buffers from the formatter's maximum textual form and switch the
call sites to scnprintf().

Changes since v1:
- correct the changelog to cite the actual maximum current-tree case
  explicitly
- frame the proof around the ISATAP formatting path instead of the earlier
  mapped-v4 example

Fixes: 75b54cb57c ("rxrpc: Add IPv6 support")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Anderson Nascimento <anderson@allelesecurity.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@kernel.org
Link: https://patch.msgid.link/20260408121252.2249051-22-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-08 18:45:32 -07:00
..
af_rxrpc.c rxrpc: Fix key/keyring checks in setsockopt(RXRPC_SECURITY_KEY/KEYRING) 2026-04-08 18:44:34 -07:00
ar-internal.h rxrpc: Fix to request an ack if window is limited 2026-04-08 18:44:33 -07:00
call_accept.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
call_event.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
call_object.c rxrpc: Fix key reference count leak from call->key 2026-04-08 18:44:32 -07:00
call_state.c rxrpc: Move client call connection to the I/O thread 2023-01-06 09:43:33 +00:00
conn_client.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
conn_event.c rxrpc: only handle RESPONSE during service challenge 2026-04-08 18:45:05 -07:00
conn_object.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
conn_service.c rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock() 2023-12-24 15:22:49 +00:00
input_rack.c rxrpc: Fix rack timer warning to report unexpected mode 2026-04-08 18:44:32 -07:00
input.c rxrpc: peer->mtu_lock is redundant 2025-02-21 15:06:29 -08:00
insecure.c rxrpc: Fix return from none_validate_challenge() 2025-05-29 12:03:21 +02:00
io_thread.c rxrpc: Only put the call ref if one was acquired 2026-04-08 18:44:33 -07:00
Kconfig rxrpc: rxgk: Provide infrastructure and key derivation 2025-04-14 17:36:41 -07:00
key.c rxrpc: Fix key/keyring checks in setsockopt(RXRPC_SECURITY_KEY/KEYRING) 2026-04-08 18:44:34 -07:00
local_event.c rxrpc: Truncate UTS_RELEASE for rxrpc version 2023-05-30 10:01:06 +02:00
local_object.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Makefile rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI) 2025-04-14 17:36:42 -07:00
misc.c rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) 2024-12-09 13:48:25 -08:00
net_ns.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
oob.c rxrpc: Allow the app to store private data on peer structs 2025-04-14 17:36:42 -07:00
output.c rxrpc: Fix to request an ack if window is limited 2026-04-08 18:44:33 -07:00
peer_event.c rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
peer_object.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
proc.c rxrpc: proc: size address buffers for %pISpc output 2026-04-08 18:45:32 -07:00
protocol.h rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI) 2025-04-14 17:36:42 -07:00
recvmsg.c rxrpc: Fix recvmsg() unconditional requeue 2026-01-19 10:07:06 -08:00
rtt.c rxrpc: Manage RTT per-call rather than per-peer 2024-12-09 13:48:32 -08:00
rxgk_app.c rxrpc: Fix untrusted unsigned subtract 2025-09-14 13:05:22 -07:00
rxgk_common.h rxrpc: Fix unhandled errors in rxgk_verify_packet_integrity() 2025-09-14 13:05:22 -07:00
rxgk_kdf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rxgk.c rxrpc: Fix buffer overread in rxgk_do_verify_authenticator() 2026-04-08 18:44:34 -07:00
rxkad.c rxrpc: Fix missing error checks for rxkad encryption/decryption failure 2026-04-08 18:44:34 -07:00
rxperf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
security.c rxrpc: Fix to use conn aborts for conn-wide failures 2025-07-17 07:50:48 -07:00
sendmsg.c rxrpc: Fix anonymous key handling 2026-04-08 18:44:31 -07:00
server_key.c rxrpc: fix reference count leak in rxrpc_server_keyring() 2026-04-08 18:44:33 -07:00
skbuff.c rxrpc: Use consume_skb() rather than kfree_skb_reason() 2023-02-07 23:11:20 +00:00
sysctl.c rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) 2024-12-09 13:48:25 -08:00
txbuf.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
utils.c