On Tue, 8 Dec 2020 23:13:51 +0100 (CET) Michal Kubecek wrote: > Syzbot reported a stack overflow in bitmap_from_arr32() called from > ethnl_parse_bitset() when bitset from netlink message is longer than > target bitmap length. While ethnl_compact_sanity_checks() makes sure that > trailing part is all zeros (i.e. the request does not try to touch bits > kernel does not recognize), we also need to cap change_bits to nbits so > that we don't try to write past the prepared bitmaps. > > Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper") > Reported-by: syzbot+9d39fa49d4df294aa...@syzkaller.appspotmail.com > Signed-off-by: Michal Kubecek <mkube...@suse.cz>
Applied, thank you!