On Thu, Jul 15, 2010 at 11:48:09AM +0200, Patrick McHardy wrote: > Am 14.07.2010 23:04, schrieb Dan Carpenter: > > Smatch complains that we copy too much data to the user in ebtables. > > We copied EBT_FUNCTION_MAXNAMELEN (32) characters to the user here, but > > "m->u.match->name" has XT_EXTENSION_MAXNAMELEN (29) characters. > > > > I'm not sure if this is a bug where someone got confused with m->u.name > > which has 32 characters or if this is done for backwards compatability. > > Looking at ebtables.h, ebt_entry_match->name uses > EBT_FUNCTION_MAXNAMELEN, which is 32 bytes. Where did you get > XT_EXTENSION_MAXNAMELEN from? > Exactly. ebt_entry_match->u.name uses EBT_FUNCTION_MAXNAMELEN but this is from ebt_entry_match->u.match->name which is type struct xt_match. But it looks like we're exporting struct ebt_match which also uses EBT_FUNCTION_MAXNAMELEN. So maybe the fix is to copy ->u.name instead of ->u.match->name. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html