Skip to content
Commit 1101a965 authored by Florian Westphal's avatar Florian Westphal Committed by Ben Hutchings
Browse files

xfrm_user: uncoditionally validate esn replay attribute struct

commit d97ca5d7 upstream.

The sanity test added in ecd79187

 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: default avatar <syzbot+0ab777c27d2bb7588f73@syzkaller.appspotmail.com>
Cc: Mathias Krause <minipli@googlemail.com>
Fixes: ecd79187 ("xfrm_user: ensure user supplied esn replay window is valid")
Fixes: d8647b79

 ("xfrm: Add user interface for esn and big anti-replay windows")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 3238114f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment