summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorDaehyeon Ko <4ncienth@gmail.com>2026-10-06 12:51:08 +0900
committerJakub Kicinski <kuba@kernel.org>2026-10-07 19:17:52 -0700
commit6d25ffca055a77787c21a36b66c253f76239411b (patch)
treec00da6c861729f69f6265eb7f99d0ab59573303f /tools/lib/python/kdoc/python_version.py
parentc57b2e60d4bf29707c51b39ed3bacbcce2f3ba2e (diff)
downloadlinux-next-6d25ffca055a77787c21a36b66c253f76239411b.tar.gz
linux-next-6d25ffca055a77787c21a36b66c253f76239411b.zip
cipso: adjust cached option offsets when removing CIPSO
cipso_v4_skbuff_delattr() removes the CIPSO bytes but does not adjust cached offsets for options that follow them. For example, with a valid 10-byte CIPSO option followed by a seven-byte RR option, parsing records rr at offset 30. Removing CIPSO moves RR to offset 20, while the cached offset remains 30. Consumers such as ip_forward_options() and __ip_options_echo() then access the wrong bytes; the latter may interpret packet data as the option length and copy it into fixed-size option storage. Mirror cipso_v4_delopt() and subtract cipso_len from the srr, rr, ts and router_alert offsets when they follow CIPSO. cipso_len is the distance the first memmove() shifts those options. The later header move and network-header reset relocate the bytes and their offset base together. Fixes: 89aa3619d141 ("cipso: make cipso_v4_skbuff_delattr() fully remove the CIPSO options") Cc: stable@vger.kernel.org Reviewed-by: Ondrej Mosnáček <omosnacek@gmail.com> Signed-off-by: Daehyeon Ko <4ncienth@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> Link: https://patch.msgid.link/20261006035108.3101440-1-4ncienth@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions