diff options
| author | Brian Feldman <green@FreeBSD.org> | 2004-09-30 17:42:00 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 2004-09-30 17:42:00 +0000 |
| commit | 88ef2880c1664c7a5f3af44b5bbdb619403dd29f (patch) | |
| tree | 9f2d07918325b1110b602690512acb3cfa25049f | |
| parent | 9fd3ae4889e2c237579fd2c0939725993a8009c0 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/ip_fw2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index a8bcede4e6d36..2d8197f2c7b2f 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -2846,6 +2846,11 @@ check_ipfw_struct(struct ip_fw *rule, int size) printf("ipfw: size mismatch (have %d want %d)\n", size, l); return (EINVAL); } + if (rule->act_ofs >= rule->cmd_len) { + printf("ipfw: bogus action offset (%u > %u)\n", + rule->act_ofs, rule->cmd_len - 1); + return (EINVAL); + } /* * Now go for the individual checks. Very simple ones, basically only * instruction sizes. |
