Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1248390ybi; Wed, 3 Jul 2019 12:09:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrBtToe8aZp5bdLBnIBE/qrTWDvP2P8YDRA06LrKcyN+NBxIiIewudDL96B5D286V2tvVq X-Received: by 2002:a17:90a:2567:: with SMTP id j94mr14575291pje.121.1562180960784; Wed, 03 Jul 2019 12:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562180960; cv=none; d=google.com; s=arc-20160816; b=faXKueJJZdHpkqWMCQsr+wv5308Kjrx1Rg2QCeR23kr8VFeh0+dp1zLgLoSP4+dHkQ Q6pcwSZS9yJc6wuUT6NABl50BZL7kbGFl6Q5Mf2noi829NnQM++xcN2rQ6Nee/imAXv8 J0CYsm2OFKJE8pI3KUMeKo5dIY5AgS16Wj2MbCKIr3nF837qzXcggO2uK+kjACQnQYul vzEBpEsN5XbhTJB7g6gvn6HWWkYtl0QK/iEBWj5xu8DT+K/2IdCoia/1TT23ZkirV0QM sgbRxbHh5vosXks2jBLDSJPLtQzLSZrt64FKdH2tSQHdXp5FmN4xaUsWmvCWUMUV1H2X Vksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aoEXYtCpaKYFu4HRzFOS+tAV4d5Uib4DQX6NqoSy0Io=; b=SW2JBfq61iu45fTZEGo/Cb7+eSxifoGNjCnPhwbZnWpPwfgfFyT5j0iDWhMpozuVOR Bgi3A6r8UxbRKxuKFKTYSYDYITTWseH9qKQdwldjvpGTYTjt0mQWQQtrR767IUZHMVEn BahBKFjyZ2HyTEO3TxsxX6EOCYE3+7u8vdWfOsq/Fx7vCtzGLt0K7M12XYOzK7744nk5 t7MI/Grl36ScEWVjr00PSISeR1Lx4P7qYnkHU0fVakXmMuvFDAaYgtUgYtjtKofK5H8r GauDFfE0Y/V4RRc2vdvPDSK+iDoUs8gVqy7D+JGi0AHbRyXkw1Sl8tRWp5IqcE6DPvm5 LnyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=B8zFC+8E; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si3118789pff.195.2019.07.03.12.08.55; Wed, 03 Jul 2019 12:09:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=B8zFC+8E; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbfGCTIw (ORCPT + 99 others); Wed, 3 Jul 2019 15:08:52 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:40587 "EHLO mail-lj1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbfGCTIv (ORCPT ); Wed, 3 Jul 2019 15:08:51 -0400 Received: by mail-lj1-f172.google.com with SMTP id a21so3637818ljh.7 for ; Wed, 03 Jul 2019 12:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aoEXYtCpaKYFu4HRzFOS+tAV4d5Uib4DQX6NqoSy0Io=; b=B8zFC+8EN3wSvH4LlkoB9jRFeQvlbx4ByRO7RfU4jwAbYzxuI6cKigTDy2Dvd0XKLo QbzA08lDJAx10h9JqTJ9cpd16R9R0JHGx+iVvzAeGiYv6/CpaeOLJOTHLHat9mPKDmPa 6WXL+Aie+++zP32yWc/p+WUYPd1ZrVwnGv758x6oP5RpFhjPutOmECIMUvUjwTU9jcNX 8AmNHRlyCgj/oYiW0zsYVF0p+tFZ8ZWzpTiG9KTfltGTOFdARhzmfEUSJAuXPxAo8Zaz G2T9hb/wJnq6rOGe4Oyxu3kffIFMiyQYNYok+Ma/5cWzPdtekA0hvej92D+6nUS30XYQ 0J+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aoEXYtCpaKYFu4HRzFOS+tAV4d5Uib4DQX6NqoSy0Io=; b=SfL7qikj3OZ+8AlT+ov3GWLFvqcG5HEEtfhG8ecBTaI8cIZsGanrncpQ9slNU3gBWK cgpUg7HJaQWZFKbJM42Jv2exlAPNo8EG5d0cgJnOQo1WJT5W2ZwhlWCu7Y54UpNG6q+/ wpBdUXQRx9Na4ZNoLgspnaibKkUMqMILZtvpGWP9IF2YoFpSGD2gZ3Z59SnLb07Ac/Oo SOPLIMPMGrjqKcbgx3V7whcdg3Vzo7PMV0t0VKhTA5n+MbMqFPXa4K+njv+PI64HziQX +Qp7QGMOM4Hs9f02BNHU2JSu6/OIDGMTd4gkbJn5mVTybc7C3yGa4yarPCzqA7gE67Gc +UjQ== X-Gm-Message-State: APjAAAWrCwsvyWVVip3X+WFLD5RnwV0kPF9rBR+zcZxnJhM+VRyc8FJS LFFSjg8J+p5GIGurlSMMWTDq6ZM0z+4= X-Received: by 2002:a2e:8559:: with SMTP id u25mr22127653ljj.224.1562180927878; Wed, 03 Jul 2019 12:08:47 -0700 (PDT) Received: from kynes.internet.domowy (apn-77-112-37-101.dynamic.gprs.plus.pl. [77.112.37.101]) by smtp.gmail.com with ESMTPSA id z12sm516946lfe.2.2019.07.03.12.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 12:08:47 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Cc: =?UTF-8?q?Micha=C5=82=20=27Khorne=27=20Lowas-Rzechonek?= Subject: [PATCH BlueZ] mesh: Fix stack overflow in get_element_properties Date: Wed, 3 Jul 2019 21:08:33 +0200 Message-Id: <20190703190833.22039-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: MichaƂ 'Khorne' Lowas-Rzechonek D-Bus type 'q' denotes uint16, not uint8. --- mesh/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/node.c b/mesh/node.c index c73ba541f..f9be96cbd 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -1200,7 +1200,7 @@ static bool get_element_properties(struct mesh_node *node, const char *path, while (l_dbus_message_iter_next_entry(properties, &key, &var)) { if (!strcmp(key, "Location")) { - uint8_t loc; + uint16_t loc; l_dbus_message_iter_get_variant(&var, "q", &loc); -- 2.20.1