Jann Horn
4987a5763f
net: block MSG_NO_SHARED_FRAGS in sendmsg()
...
This change should cause no difference in behavior; it just cleans up some
hazardous code that could have become a problem in the future.
MSG_NO_SHARED_FRAGS is a kernel-internal flag that cancels the effect of
MSG_SPLICE_PAGES, another kernel-internal flag that influences the
data-sharing semantics of SKBs.
Prevent passing this flag in from userspace via sendmsg() by adding it to
MSG_INTERNAL_SENDMSG_FLAGS.
This is not currently an observable problem because MSG_NO_SHARED_FRAGS
only has an effect if kernel code adds MSG_SPLICE_PAGES to it.
The only codepath that adds MSG_SPLICE_PAGES to user-supplied flags from
which MSG_NO_SHARED_FRAGS hasn't been cleared is the path
tcp_bpf_sendmsg -> tcp_bpf_send_verdict -> tcp_bpf_push, and that is not a
problem because tcp_bpf_sendmsg always intentionally sets
MSG_NO_SHARED_FRAGS anyway.
Signed-off-by: Jann Horn <jannh@google.com >
Link: https://patch.msgid.link/20260512-msg_no_shared_frags-v1-1-55ea46760331@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2026-05-14 18:00:40 -07:00
..
2026-04-13 19:03:11 -07:00
2026-04-08 19:38:52 -07:00
2026-04-16 20:34:34 -07:00
2026-04-16 19:27:51 -07:00
2026-04-13 20:10:58 -07:00
2026-04-18 00:10:48 -07:00
2026-04-20 11:31:01 -07:00
2026-05-08 18:50:34 -07:00
2026-04-15 14:15:25 -07:00
2026-04-27 15:08:04 +02:00
2026-05-02 19:12:36 -07:00
2026-05-08 01:30:16 +02:00
2026-05-08 01:30:16 +02:00
2026-05-08 01:30:16 +02:00
2026-05-08 01:30:16 +02:00
2026-05-06 19:18:45 -07:00
2026-05-13 15:00:40 -07:00
2026-04-17 14:18:55 -07:00
2026-04-22 15:10:22 +01:00
2026-04-24 14:20:03 -07:00
2026-04-19 08:47:40 -07:00
2026-04-15 16:52:20 +02:00
2026-04-18 00:10:50 -07:00
2026-05-06 17:08:39 +01:00
2026-04-13 14:56:54 -07:00
2026-04-07 08:22:24 -06:00
2026-04-09 13:28:05 -04:00
2026-04-13 15:51:31 -07:00
2026-04-10 21:22:32 -07:00
2026-04-16 07:03:40 -07:00
2026-04-06 18:37:52 -07:00
2026-04-22 12:58:57 -07:00
2026-04-12 11:33:23 -07:00
2026-04-27 15:52:51 -06:00
2026-05-04 08:52:26 -10:00
2026-05-04 09:06:03 -10:00
2026-04-16 10:12:43 -07:00
2026-04-11 07:58:33 +02:00
2026-04-14 10:53:44 -07:00
2026-04-15 08:37:45 -07:00
2026-04-07 15:32:20 +02:00
2026-04-18 00:10:51 -07:00
2026-04-21 14:12:01 -07:00
2026-04-21 07:30:44 -07:00
2026-04-19 12:58:08 -07:00
2026-04-27 10:26:49 +02:00
2026-04-08 15:27:47 +02:00
2026-05-12 18:48:07 -07:00
2026-04-06 20:21:37 -06:00
2026-04-16 22:19:29 +02:00
2026-04-24 00:36:50 +02:00
2026-04-16 07:03:40 -07:00
2026-04-07 17:38:07 +02:00
2026-05-11 19:04:46 +09:00
2026-04-19 08:01:17 -07:00
2026-04-16 13:31:04 +02:00
2026-04-06 20:21:37 -06:00
2026-04-06 20:21:37 -06:00
2026-04-08 14:23:29 -07:00
2026-04-16 21:07:13 +02:00
2026-04-12 16:46:29 +08:00
2026-04-15 12:59:16 -07:00
2026-04-22 09:50:46 -07:00
2026-05-05 14:49:01 +02:00
2026-04-07 15:36:02 +02:00
2026-05-05 14:49:01 +02:00
2026-05-05 13:52:23 +02:00
2026-05-14 12:42:11 +02:00
2026-04-12 15:20:46 -07:00
2026-04-13 15:09:49 +02:00
2026-05-13 17:52:55 -07:00
2026-04-23 12:13:57 +02:00
2026-05-04 19:09:41 -07:00
2026-04-13 16:22:30 -07:00
2026-04-15 12:59:16 -07:00
2026-04-09 13:18:27 +01:00
2026-04-14 23:03:02 -07:00
2026-04-09 10:52:35 -04:00
2026-04-13 10:10:28 -07:00
2026-04-18 00:10:48 -07:00
2026-04-21 16:41:54 +01:00
2026-04-09 14:36:52 +02:00
2026-04-09 14:36:52 +02:00
2026-04-13 19:00:43 +02:00
2026-04-18 00:10:50 -07:00
2026-04-13 15:42:19 -07:00
2026-04-18 13:07:36 -05:00
2026-04-27 05:54:25 -07:00
2026-04-18 11:29:14 -07:00
2026-04-18 00:10:48 -07:00
2026-04-18 00:10:47 -07:00
2026-04-27 05:54:24 -07:00
2026-04-08 13:18:57 -07:00
2026-04-15 12:59:16 -07:00
2026-04-19 08:01:17 -07:00
2026-04-27 18:46:17 -07:00
2026-04-13 14:56:28 -07:00
2026-05-11 17:30:44 -07:00
2026-05-13 18:09:13 -07:00
2026-04-22 08:53:23 -04:00
2026-04-13 11:46:08 -07:00
2026-04-24 00:34:59 +02:00
2026-04-27 15:47:21 -06:00
2026-04-17 14:09:02 -07:00
2026-04-10 17:27:39 -05:00
2026-04-06 16:55:16 +02:00
2026-04-15 14:41:21 -07:00
2026-04-18 00:10:50 -07:00
2026-04-12 11:33:23 -07:00
2026-04-20 11:35:17 -07:00
2026-04-20 15:42:18 -07:00
2026-05-13 17:52:55 -07:00
2026-04-21 12:48:44 +02:00
2026-04-07 12:24:49 -07:00
2026-04-10 11:46:15 +01:00
2026-04-20 20:10:50 -10:00
2026-04-20 20:10:50 -10:00
2026-05-06 17:40:15 +02:00
2026-05-06 17:40:15 +02:00
2026-05-05 16:02:57 +02:00
2026-05-14 08:32:11 -07:00
2026-04-13 15:42:19 -07:00
2026-04-19 08:44:41 -07:00
2026-04-19 08:01:17 -07:00
2026-05-12 18:31:11 -07:00
2026-05-01 16:24:25 -05:00
2026-05-14 18:00:40 -07:00
2026-04-18 00:10:47 -07:00
2026-04-13 19:03:11 -07:00
2026-04-17 14:23:26 -06:00
2026-05-01 17:22:45 -07:00
2026-04-08 12:30:31 +02:00
2026-04-21 18:54:28 +03:00
2026-04-28 14:28:29 -04:00
2026-04-13 08:39:51 -07:00
2026-04-18 00:10:54 -07:00
2026-04-20 12:02:24 -07:00
2026-04-28 06:13:40 -10:00