Re: [PATCH next] net: xfrm: fix shift-out-of-bounce

From: Steffen Klassert
Date: Mon Aug 02 2021 - 01:51:46 EST


On Wed, Jul 28, 2021 at 07:38:18PM +0300, Pavel Skripkin wrote:
> We need to check up->dirmask to avoid shift-out-of-bounce bug,
> since up->dirmask comes from userspace.
>
> Also, added XFRM_USERPOLICY_DIRMASK_MAX constant to uapi to inform
> user-space that up->dirmask has maximum possible value
>
> Fixes: 2d151d39073a ("xfrm: Add possibility to set the default to block if we have no policy")
> Reported-and-tested-by: syzbot+9cd5837a045bbee5b810@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>

Applied, thanks a lot!