]> git.baikalelectronics.ru Git - kernel.git/commit
IPVS: fix potential stack overflow with overly long protocol names
authorPatrick McHardy <kaber@trash.net>
Thu, 8 Apr 2010 11:35:47 +0000 (13:35 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 8 Apr 2010 11:35:47 +0000 (13:35 +0200)
commitb8146f6452e695ed4e5aeb332344d2e9f6859764
treecd5c6a16e0f48f99045e032a4ceb8946ec9d7ef0
parent82a73efeb688828e4150183a75080f68460976bf
IPVS: fix potential stack overflow with overly long protocol names

When protocols use very long names, the sprintf calls might overflow
the on-stack buffer. No protocol in the kernel does this however.

Print the protocol name in the pr_debug statement directly to avoid
this.

Based on patch by Zhitong Wang <zhitong.wangzt@alibaba-inc.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/ipvs/ip_vs_proto.c
net/netfilter/ipvs/ip_vs_proto_ah_esp.c