Commit 2722cd8
xfrm_user: uncoditionally validate esn replay attribute struct
[ Upstream commit d97ca5d ]
The sanity test added in ecd7918 can be bypassed, validation
only occurs if XFRM_STATE_ESN flag is set, but rest of code doesn't care
and just checks if the attribute itself is present.
So always validate. Alternative is to reject if we have the attribute
without the flag but that would change abi.
Reported-by: [email protected]
Cc: Mathias Krause <[email protected]>
Fixes: ecd7918 ("xfrm_user: ensure user supplied esn replay window is valid")
Fixes: d8647b7 ("xfrm: Add user interface for esn and big anti-replay windows")
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 9e07b5d commit 2722cd8
1 file changed
+8
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
| 124 | + | |
126 | 125 | | |
127 | | - | |
| 126 | + | |
128 | 127 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 128 | + | |
| 129 | + | |
136 | 130 | | |
137 | | - | |
138 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
139 | 134 | | |
140 | 135 | | |
141 | 136 | | |
| |||
0 commit comments