Blame SOURCES/0175-bus-message-return-EBADMSG-not-EINVAL-on-invalid-gva.patch

a3e2b5
From b63440ad69581bad39a2eda7ab449f8a3f901c4e Mon Sep 17 00:00:00 2001
a3e2b5
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
a3e2b5
Date: Sat, 11 Aug 2018 11:43:09 +0200
a3e2b5
Subject: [PATCH] bus-message: return -EBADMSG not -EINVAL on invalid !gvariant
a3e2b5
 messages
a3e2b5
a3e2b5
(cherry picked from commit d831fb6f2bde829f9309aea242f502587662d1cc)
a3e2b5
a3e2b5
Resolves: #1696224
a3e2b5
---
a3e2b5
 src/libsystemd/sd-bus/bus-message.c               |   2 +-
a3e2b5
 ...crash-4162a61a79e4c5a832ca5232212f75fa560a1f75 | Bin 0 -> 534 bytes
a3e2b5
 2 files changed, 1 insertion(+), 1 deletion(-)
a3e2b5
 create mode 100644 test/fuzz/fuzz-bus-message/crash-4162a61a79e4c5a832ca5232212f75fa560a1f75
a3e2b5
a3e2b5
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
a3e2b5
index e71d29f91d..613722a1a0 100644
a3e2b5
--- a/src/libsystemd/sd-bus/bus-message.c
a3e2b5
+++ b/src/libsystemd/sd-bus/bus-message.c
a3e2b5
@@ -5047,7 +5047,7 @@ static int message_skip_fields(
a3e2b5
 
a3e2b5
                         *signature += l;
a3e2b5
                 } else
a3e2b5
-                        return -EINVAL;
a3e2b5
+                        return -EBADMSG;
a3e2b5
         }
a3e2b5
 }
a3e2b5
 
a3e2b5
diff --git a/test/fuzz/fuzz-bus-message/crash-4162a61a79e4c5a832ca5232212f75fa560a1f75 b/test/fuzz/fuzz-bus-message/crash-4162a61a79e4c5a832ca5232212f75fa560a1f75
a3e2b5
new file mode 100644
a3e2b5
index 0000000000000000000000000000000000000000..5faf3308e7ac9c14d66422169e74ba8c05ad7319
a3e2b5
GIT binary patch
a3e2b5
literal 534
a3e2b5
zcmd5(y$ZrW3{L#Rf|Cy*1sA)t;uE+zxcCZJw53qIqj#v2xH$UGez{(yI63-3NWO$5
a3e2b5
zU+!uqzB5rdCwdYQvnEi=V1glA8o?i`lMy}upTQSe=c-Assy=GTr+lHv=4$0!Vy$EX
a3e2b5
z_LzYX&1*Ob(W(=vPGKsxuBpzYaDn6&un5*x;uk`Xz?Yk^O%qgGJ(zd
a3e2b5
sLgf|{Zt3X?n*AhyXRr3JnuD(2&Q!)fgDPC^-?wYdB
a3e2b5
a3e2b5
literal 0
a3e2b5
HcmV?d00001
a3e2b5