Re: [PATCH] smsc95xx: fix suspend buffer overflow
From: Steve Glendinning <hidden>
Date: 2012-11-28 18:06:07
From: Steve Glendinning <hidden>
Date: 2012-11-28 18:06:07
quoted
if (pdata->wolopts & (WAKE_BCAST | WAKE_MCAST | WAKE_ARP | WAKE_UCAST)) { - u32 *filter_mask = kzalloc(32, GFP_KERNEL); + u32 *filter_mask = kzalloc(sizeof(u32) * 32, GFP_KERNEL);It's also unchecked for alloc failure.
Thanks both, I've resubmitted with an alloc failure check, I completely agree - that filter code isn't pretty! If you have time to knock up a patch I'd be happy to test it. Steve