lkml.org 
[lkml]   [2020]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] netlink: policy: correct validation type check
From
From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 31 Aug 2020 20:28:05 +0200

> From: Johannes Berg <johannes.berg@intel.com>
>
> In the policy export for binary attributes I erroneously used
> a != NLA_VALIDATE_NONE comparison instead of checking for the
> two possible values, which meant that if a validation function
> pointer ended up aliasing the min/max as negatives, we'd hit
> a warning in nla_get_range_unsigned().
>
> Fix this to correctly check for only the two types that should
> be handled here, i.e. range with or without warn-too-long.
>
> Reported-by: syzbot+353df1490da781637624@syzkaller.appspotmail.com
> Fixes: 8aa26c575fb3 ("netlink: make NLA_BINARY validation more flexible")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Applied, thank you.

\
 
 \ /
  Last update: 2020-08-31 21:03    [W:0.026 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site