diff --git a/patches.suse/xfrm-fix-sa-selector-validation.patch b/patches.suse/xfrm-fix-sa-selector-validation.patch new file mode 100644 index 0000000..1869c7c --- /dev/null +++ b/patches.suse/xfrm-fix-sa-selector-validation.patch @@ -0,0 +1,43 @@ +From b8d6d0079757cbd1b69724cfd1c08e2171c68cee Mon Sep 17 00:00:00 2001 +From: Nicolas Dichtel +Date: Fri, 14 Jun 2019 11:13:55 +0200 +Subject: [PATCH] xfrm: fix sa selector validation +Patch-mainline: v5.3-rc1 +Git-commit: b8d6d0079757cbd1b69724cfd1c08e2171c68cee +References: bsc#1156609 + +After commit b38ff4075a80, the following command does not work anymore: +$ ip xfrm state add src 10.125.0.2 dst 10.125.0.1 proto esp spi 34 reqid 1 \ + mode tunnel enc 'cbc(aes)' 0xb0abdba8b782ad9d364ec81e3a7d82a1 auth-trunc \ + 'hmac(sha1)' 0xe26609ebd00acb6a4d51fca13e49ea78a72c73e6 96 flag align4 + +In fact, the selector is not mandatory, allow the user to provide an empty +selector. + +Fixes: b38ff4075a80 ("xfrm: Fix xfrm sel prefix length validation") +CC: Anirudh Gupta +Signed-off-by: Nicolas Dichtel +Acked-by: Herbert Xu +Signed-off-by: Steffen Klassert +Signed-off-by: Petr Vorel +--- + net/xfrm/xfrm_user.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c +index 74a3d1e0ff63..6626564f1fb7 100644 +--- a/net/xfrm/xfrm_user.c ++++ b/net/xfrm/xfrm_user.c +@@ -166,6 +166,9 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, + } + + switch (p->sel.family) { ++ case AF_UNSPEC: ++ break; ++ + case AF_INET: + if (p->sel.prefixlen_d > 32 || p->sel.prefixlen_s > 32) + goto out; +-- +2.16.4 + diff --git a/series.conf b/series.conf index d2be47c..a67f5fa 100644 --- a/series.conf +++ b/series.conf @@ -49924,6 +49924,7 @@ patches.suse/bonding-validate-ip-header-before-check-IPPROTO_IGMP.patch patches.suse/0001-xfrm-Fix-xfrm-sel-prefix-length-validation.patch patches.suse/af_key-fix-leaks-in-key_pol_get_resp-and-dump_sp.patch + patches.suse/xfrm-fix-sa-selector-validation.patch patches.suse/nfc-fix-potential-illegal-memory-access.patch patches.suse/tcp-Reset-bytes_acked-and-bytes_received-when-discon.patch patches.suse/net-tls-fix-socket-wmem-accounting-on-fallback-with-.patch