]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r328350:
authorae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Jan 2018 09:26:28 +0000 (09:26 +0000)
committerae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Jan 2018 09:26:28 +0000 (09:26 +0000)
commit121dddfbafa463e9666431d468463b6f94b13419
tree075c948971689df7c2020d6d99f8f1b23d0fec0e
parent5d161d192120a52069ca56c05c626abf69384034
MFC r328350:
  Merge revision 1.35 from NetBSD:
    fix pointer/offset mistakes in handling of IPv4 options

  Reported by:  Maxime Villard <maxv at NetBSD.org>

MFC r328352:
  Adopt revision 1.76 and 1.77 from NetBSD:
    Fix a vulnerability in IPsec-IPv6-AH, that allows an attacker to remotely
    crash the kernel with a single packet.

    In this loop we need to increment 'ad' by two, because the length field
    of the option header does not count the size of the option header itself.

    If the length is zero, then 'count' is incremented by zero, and there's
    an infinite loop. Beyond that, this code was written with the assumption
    that since the IPv6 packet already went through the generic IPv6 option
    parser, several fields are guaranteed to be valid; but this assumption
    does not hold because of the missing '+2', and there's as a result a
    triggerable buffer overflow (write zeros after the end of the mbuf,
    potentially to the next mbuf in memory since it's a pool).

    Add the missing '+2', this place will be reinforced in separate commits.

  Reported by:  Maxime Villard <maxv at NetBSD.org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@328621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netipsec/xform_ah.c