Skip to content
Commit efb796f5 authored by Michal Kubecek's avatar Michal Kubecek Committed by Jakub Kicinski
Browse files

ethtool: fix string set id check

Syzbot reported a shift of a u32 by more than 31 in strset_parse_request()
which is undefined behavior. This is caused by range check of string set id
using variable ret (which is always 0 at this point) instead of id (string
set id from request).

Fixes: 71921690

 ("ethtool: provide string sets with STRSET_GET request")
Reported-by: default avatar <syzbot+96523fb438937cd01220@syzkaller.appspotmail.com>
Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
Link: https://lore.kernel.org/r/b54ed5c5fd972a59afea3e1badfb36d86df68799.1607952208.git.mkubecek@suse.cz


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f87675b8
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