summaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2023-05-09 10:59:58 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2023-05-10 07:04:50 +0200
commit3d776e31c841ba2f69895d2255a49320bec7cea6 (patch)
tree419eee72a9f03edc83953ead50e22e9a0066bfdb /net/key
parent5fc46f94219d1d103ffb5f0832be9da674d85a73 (diff)
downloadlinux-3d776e31c841ba2f69895d2255a49320bec7cea6.tar.gz
linux-3d776e31c841ba2f69895d2255a49320bec7cea6.tar.bz2
linux-3d776e31c841ba2f69895d2255a49320bec7cea6.zip
xfrm: Reject optional tunnel/BEET mode templates in outbound policies
xfrm_state_find() uses `encap_family` of the current template with the passed local and remote addresses to find a matching state. If an optional tunnel or BEET mode template is skipped in a mixed-family scenario, there could be a mismatch causing an out-of-bounds read as the addresses were not replaced to match the family of the next template. While there are theoretical use cases for optional templates in outbound policies, the only practical one is to skip IPComp states in inbound policies if uncompressed packets are received that are handled by an implicitly created IPIP state instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Tobias Brunner <tobias@strongswan.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/key')
0 files changed, 0 insertions, 0 deletions