Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1628234rdb; Mon, 2 Oct 2023 16:13:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeRU7qO14kDVyBnHCEs1XYJAHAqUPZu5cWmdVbNrNlfSand8KE1ENuKJ6FahKKEgcfw0rk X-Received: by 2002:a17:902:c115:b0:1bf:4a1f:2b57 with SMTP id 21-20020a170902c11500b001bf4a1f2b57mr13170245pli.13.1696288401137; Mon, 02 Oct 2023 16:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696288401; cv=none; d=google.com; s=arc-20160816; b=V5xe5pHDX/BxN+CqwCUtzdIKcbIG6W9GWKz8LxzJRjeINKlFZJ3lj9crIqZivLiwWO RI9xdPvxSt7p6ffJzCI35ixJC1PQljZA0abx+YzXPn8csqTaGYHn0fTj33xuagYfl+Vt v+1AmmywDVvCfSbaFrpysERNchUpKtY7YDAAanbGxtPzvflFzAQdZ/YYDJO56Hhy86Vd V5j2kQfd20YAa0pmZapBXVT55/9AQFeuM0q7f0hxhZ5/8a0YHr0/rjakgEU3i8qYahd9 4tPReIYk9kuklc4buY0qWX3ae9TFXWMOfzrBzrsxyWbRP8L9Iu9Srrb2Xkb9POJj5HZw K9lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=JpYutWjFqZxEpDs2kxc762rU/OhATu8xckFRLTT1LHU=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=Ys20uvolYyWxjToBWBGYmE+NJFfF5pYxUGn+KDxix8NDFleTsMAnnd3/gCpYQEBr7T SC9WAGGBVtm/Bdafc7vT79KnJWmSu62x8fL4fEnQy497RO63Sron+D8EA/KUGCDjykJ+ LhPeMvm4ie1DvPdMq4bBgAsSleu5emvc1zWgQhMYcxF9S2BSmWSH+2v1uqkXKnxXrNPw BzErWIXryXAFiD7KVfoY7nQe+iPbIKYbPzlcSauIspryiA2QbtmKU7VbrgmnQn5UF6cK 5y9o8zOkpwMGpnjna9DTutiv8buj+SCDhpcdI3ixBThI9SqClutpiQAZwZqYs5lQwPTz MWlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d1PTaSIA; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ko15-20020a17090307cf00b001bda57935fasi543plb.64.2023.10.02.16.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 16:13:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d1PTaSIA; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 91840802A6D0; Mon, 2 Oct 2023 16:13:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbjJBXNS (ORCPT + 99 others); Mon, 2 Oct 2023 19:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjJBXNR (ORCPT ); Mon, 2 Oct 2023 19:13:17 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75841BD for ; Mon, 2 Oct 2023 16:13:14 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c3cbfa40d6so2502215ad.1 for ; Mon, 02 Oct 2023 16:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696288393; x=1696893193; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=JpYutWjFqZxEpDs2kxc762rU/OhATu8xckFRLTT1LHU=; b=d1PTaSIA2LWLFKcIEUcFDkyx+0FFN/HruxD9UVVO18rSl8atD5OoOpYI3XU6Ectog2 wWeaqbzNtwsdPZNivEgf67yBGFn1KxtZ1TFQN3euFMwSfA4q3LKFeNK2Df52vCqrroR4 u5c/4KhPyux/Jo2f1ZOP+BHChNBo94f2QghHY9julxIFo71w7ZE7Cip9QrRxRt7ujuJC GKVAG9dD99f0FKFhjZg1i+a+jz2dDL7HzZoqGmICTHLPcRqGXeoB6kyWtj6wuxSU+JmK MM+WAflsv1PtPFpq4na7M7QEQ2Yme1yWjTvKFSzSzKxtlTER5SJex1lIRdIZRJkR6usv w2hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696288393; x=1696893193; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JpYutWjFqZxEpDs2kxc762rU/OhATu8xckFRLTT1LHU=; b=GtBdUz9x3tka+Vy9MynBC2iJlfg8PcZbwm4ykPJ5D4tnpz4a3SVwh5fZkRhbu4yodh LZzKzIARij+dzUOuusxJLJAi0cRVZYPrfRR2c4VWF3/QWeGDHHUR1leeq3acbYWdGrFk NGWOoF5djuMa7eC6t4cmDsYxY1TRdU5YQ+Tsx1C8sD1lJuGNLDnN/BCLSt1PpLylo1py pxjC8JC42bD0Ku31cvOJ8Bqc9SgPULf1LRLY99BBE1Acq/YcfNVnafWEjgIHLNPuO692 6oZPODE3PxkQGv/qo65y67J7hTGKWnxfdZN1PjD98A7bDcQf3+/Iir8VbJSlbBmiglFS u79w== X-Gm-Message-State: AOJu0YyamdJDFx1Q++pDcMQz1pySPUu23qcAHtkb9FjcLpKN0Ua6DW2y iA9PSWBgDS+DO0ntZcewpyHwip5T2O9c8V3P X-Received: by 2002:a17:902:c948:b0:1c4:4c73:94e6 with SMTP id i8-20020a170902c94800b001c44c7394e6mr15291306pla.51.1696288392950; Mon, 02 Oct 2023 16:13:12 -0700 (PDT) Received: from lvondent-mobl4.. (c-98-232-221-87.hsd1.or.comcast.net. [98.232.221.87]) by smtp.gmail.com with ESMTPSA id l11-20020a170902d34b00b001c75627545csm5181817plk.135.2023.10.02.16.13.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 16:13:12 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/6] shared/csip: Fix returning invalid data to attribute Size reads Date: Mon, 2 Oct 2023 16:13:05 -0700 Message-ID: <20231002231311.3104749-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 16:13:17 -0700 (PDT) From: Luiz Augusto von Dentz The attribute Size value is stored in the size_val not on size member which represents the attribute object. --- src/shared/csip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/csip.c b/src/shared/csip.c index 04a8d542b390..24d5d6a323bd 100644 --- a/src/shared/csip.c +++ b/src/shared/csip.c @@ -291,8 +291,8 @@ static void csis_size_read(struct gatt_db_attribute *attrib, struct bt_csis *csis = user_data; struct iovec iov; - iov.iov_base = &csis->size; - iov.iov_len = sizeof(csis->size); + iov.iov_base = &csis->size_val; + iov.iov_len = sizeof(csis->size_val); gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base, iov.iov_len); -- 2.41.0