diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2018-05-30 11:44:17 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2018-05-30 11:44:17 +0000 |
commit | fff54ff35dbce13db1c984d2b37adeea10461431 (patch) | |
tree | 3c6c0737da5c6704c1054ce880dbae5cd7cc3e3b | |
parent | 21e2c666e809045ac5b02a65fa8b9c6708909804 (diff) | |
parent | e5d18d1ceadd308280e89216cc186d7aa8058459 (diff) | |
download | illumos-joyent-fff54ff35dbce13db1c984d2b37adeea10461431.tar.gz |
[illumos-gate merge]
commit e5d18d1ceadd308280e89216cc186d7aa8058459
9560 IPv4 packets in IPv6 ethernet frames panic debug builds
-rw-r--r-- | usr/src/uts/common/io/mac/mac_sched.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/mac/mac_sched.c b/usr/src/uts/common/io/mac/mac_sched.c index e570f541a5..59d59287b4 100644 --- a/usr/src/uts/common/io/mac/mac_sched.c +++ b/usr/src/uts/common/io/mac/mac_sched.c @@ -1793,8 +1793,11 @@ mac_rx_srs_long_fanout(mac_soft_ring_set_t *mac_srs, mblk_t *mp, * when mac_ip_hdr_length_v6() fails because of malformed * packets or because mblks need to be concatenated using * pullupmsg(). + * + * Perform a version check to prevent parsing weirdness... */ - if (!mac_ip_hdr_length_v6(ip6h, mp->b_wptr, &hdr_len, &nexthdr, + if (IPH_HDR_VERSION(ip6h) != IPV6_VERSION || + !mac_ip_hdr_length_v6(ip6h, mp->b_wptr, &hdr_len, &nexthdr, NULL)) { goto src_dst_based_fanout; } |