Files
linux/net/ipv4
Ondrej Mosnacek 11b09f4015 cipso: fix total option length computation
[ Upstream commit 9f36169912 ]

As evident from the definition of ip_options_get(), the IP option
IPOPT_END is used to pad the IP option data array, not IPOPT_NOP. Yet
the loop that walks the IP options to determine the total IP options
length in cipso_v4_delopt() doesn't take IPOPT_END into account.

Fix it by recognizing the IPOPT_END value as the end of actual options.

Fixes: 014ab19a69 ("selinux: Set socket NetLabel based on connection endpoint")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:08:22 +02:00
..
2020-01-29 16:45:22 +01:00
2023-04-20 12:07:33 +02:00
2022-05-18 09:47:28 +02:00
2024-06-16 13:28:52 +02:00