[Devel] [PATCH hci-8.2 v2 15/15] ms/cipso: stop modifying live ip_options_rcu

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 18:45:11 MSK 2026


> From: Jann Horn <jannh at google.com>
> 
> [ Upstream commit 1f2c5183fc0902892648f0453e38c0951cef3fec ]
> 
> 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.
> 
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-158162
> Feature: fix ms/net
> 
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201153749.2872789-1-eva.kurchatova@virtuozzo.com?part=15




More information about the Devel mailing list