Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1192825pxb; Fri, 1 Apr 2022 07:05:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzplnG2Bn4YiWjCE07ZfT+Mk/Pi/Ls1wnJBI+wjTeh1N38dusOJSZxqqnRczdcdAWIC8XKu X-Received: by 2002:aa7:c345:0:b0:419:12ae:449c with SMTP id j5-20020aa7c345000000b0041912ae449cmr21276739edr.300.1648821907968; Fri, 01 Apr 2022 07:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648821907; cv=none; d=google.com; s=arc-20160816; b=Bv4O6jTl6/MbLXzhv2KGzSbqz1f3PO0WNztTJ/n+JSrwu9iYscW22g0M/LAjlVVdYC jGgG3ejERcMF5w4SO+6M61fhH++q0Rco4SjBJYKgpEyd0q2S/wjbqkj/GL+fyaji0lzG MP04vKauuscEQenZnk7Gog9SLpwPwNfrNQy0BtVyhQ6LmysC1xovtA1+PILCHUsB5jVi ixgEK8NIilGHt8pd7bRr/A9geQg42CFRu3/kbMtwoFEAKJZKjokdoltdJWEhk8a/zgGs NS7OW8VgDjdwvXPJSFNFHsTJxegAHbE0VGO2/8pAJ1paPUUnVkvrt5qyxmhxfwHQvGm2 lX8w== 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:cc:to:from:dkim-filter; bh=/Zmnt6yWBDloTUPehuNroi8LOKbBLuCXxrQ6JXzQmQQ=; b=JWTlS2wwwHqg3LNt2CYuS621H0LyT+oFuG2l+KiuM4gq/KZXru57GKHCxL+wMoA2J9 TASWZMAhsJdBuDT5OG0iIMgPYzNWaLvuUOm12T2k9KppADaUSMkwpHvGD6JuDCZQkCNj /Qvp3vZpfEdru2tjrdwNsCl3NO8bKHZEHTTqMCQhjQyY8wPIfqYprO8NmSKNZYPvH5n6 8aMyEwKqiUqHvXcyYNc+AYqGcWuhuSfqOxXZzmz05/s/EgdDWr3d4AJHLFZqueuf4QMQ K/CJc4wzlXrAyEXpBjuFt2HhCYZ7xFa9aWgOp3ehD18LDzNJ2ml3Lm66ZUqVlk+dQBrv r/kQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a056402441200b00419a55e0122si2316232eda.258.2022.04.01.07.04.26; Fri, 01 Apr 2022 07:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345279AbiDALQG (ORCPT + 99 others); Fri, 1 Apr 2022 07:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237488AbiDALQF (ORCPT ); Fri, 1 Apr 2022 07:16:05 -0400 Received: from mxout04.lancloud.ru (mxout04.lancloud.ru [45.84.86.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86B66120DBC for ; Fri, 1 Apr 2022 04:14:15 -0700 (PDT) Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 0A86820C601C Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Ildar Kamaletdinov To: CC: Ildar Kamaletdinov Subject: [PATCH BlueZ 0/7] [v3] Fix bugs found by SVACE static analisys tool Date: Fri, 1 Apr 2022 14:14:01 +0300 Message-ID: <20220401111408.3961844-1-i.kamaletdinov@omp.ru> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1910.lancloud.ru (fd00:f066::80) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch set includes few fixes that was found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. I have manually filtered out non-relevant and false positive problems and only procedeed with bugs that currently lead to some errors/vulnerabilities or may lead to them in some specific conditions. Changelog: v3 one fix wasn't staged, sorry, one more fix after CI checks v2 some minor style fixes after CI check. v1 initial version. Ildar Kamaletdinov (7): monitor: Fix out-of-bound read in print_le_states tools: Fix buffer overflow in hciattach_tialt.c tools: Fix signed integer overflow in btsnoop.c tools: Prevent infinity loops in bluemoon.c tools: Limit width of fields in sscanf device: Limit width of fields in sscanf gatt: Fix double free and freed memory dereference monitor/packet.c | 7 ++++--- src/device.c | 14 +++++++------- src/gatt-database.c | 4 ++++ tools/bluemoon.c | 13 +++++++++++++ tools/btmgmt.c | 2 +- tools/btsnoop.c | 2 +- tools/hciattach_tialt.c | 3 ++- tools/hex2hcd.c | 2 +- 8 files changed, 33 insertions(+), 14 deletions(-) -- 2.35.1