Message ID | CAP=GMUFA-qAOxF1W=aeWDYBiR-GSohJYGHiMDsrqwsD0xdg3_Q@mail.gmail.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2016-03-24 at 00:42 +0800, Baozeng wrote: > Thanks for your quick patch. I tested it but it still reproduce the > bug. We should limit the length of the name, > not the prefix. The following patch fixs it. > > diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c > index 67b2e27..4837425 100644 > --- a/net/bridge/netfilter/ebtables.c > +++ b/net/bridge/netfilter/ebtables.c > @@ -346,7 +346,7 @@ find_inlist_lock(struct list_head *head, const > char *name, const char *prefix, > { > return try_then_request_module( > find_inlist_lock_noload(head, name, error, mutex), > - "%s%s", prefix, name); > + "%s%.*s", prefix, EBT_TABLE_MAXNAMELEN, name); > } > Right you are, please send a formal patch ? Thanks !
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 67b2e27..4837425 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -346,7 +346,7 @@ find_inlist_lock(struct list_head *head, const char *name, const char *prefix, { return try_then_request_module( find_inlist_lock_noload(head, name, error, mutex), - "%s%s", prefix, name); + "%s%.*s", prefix, EBT_TABLE_MAXNAMELEN, name); }