summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2026-11-06 22:40:31 +0100
committerJakub Kicinski <kuba@kernel.org>2026-11-10 16:37:31 -0800
commit1f2c5183fc0902892648f0453e38c0951cef3fec (patch)
tree68cd9b517b875f45bc56f91847ca1e519ba2cfac /tools/perf/scripts/python/bin
parentd2809ccf3cfc3c30581dc64ebec5f49f7ee1e228 (diff)
cipso: stop modifying live ip_options_rcu
cipso_v4_delopt() operates on the ip_options_rcu of a socket or a request socket, and tries to remove CIPSO options from the middle by moving all subsequent options. That's not allowed - ip_options_rcu can be read locklessly and must always be consistent. For example, ip_options_undo() reads trusted offsets and length values from the options buffer. Fix it by doing the modification in a copy. The core change is in cipso_v4_delopt(), the rest is ugly plumbing to propagate memory allocation failures. Triggering this bug requires that the system is configured to use CIPSO. (Setting up CIPSO requires privileges in init_user_ns.) Fixes: f6d8bd051c39 ("inet: add RCU protection to inet->opt") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn <jannh@google.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Acked-by: Paul Moore <paul@paul-moore.com> Link: https://patch.msgid.link/20261106-cipso-rcuopts-v1-1-31ae931d7a0f@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions