Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1031647rwe; Fri, 14 Apr 2023 13:12:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ae6UMyXL8A34JTvr7GPMMyjU3lFalWrx8GeAu4xmWzunqzynIVvli9Ug7LoUXeD0Rr4WA0 X-Received: by 2002:a05:6a20:77af:b0:d9:237e:9d08 with SMTP id c47-20020a056a2077af00b000d9237e9d08mr6186205pzg.3.1681503148137; Fri, 14 Apr 2023 13:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681503148; cv=none; d=google.com; s=arc-20160816; b=hNElE5QhEVBRQBEeJ54JJ4yBekWKVzB09dwetkKIS/jv7v3ylpF27p3eq0Rf0LRjlJ STml4prI5z8gTMqV4ZO95/lrzEqsCrV5gwJOzWv5/KbRtPzXfm8xkSuJE/YKbGUafyRv QuiPoY7zx4KUeCwLNT1MsrrJAoXLEO+rsxwB2WmA0nINmfWjqJOXy1wjhw6YKxm8kFEL mMd6rNGjHl8I/dMxy1sZ387Exlc42d9FS+uzUBWffXY3EV5m7U8I0K5635QADZ4F3Y0r GyXJLkjIjWAugTSiTrEF5U9rmJk3K0in6XTpVccoWE+hcPJsyot5I8a0FRYv8eCe8dBw REsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=h0cLqr697aQyvx92FvkqcuTlgbTUe9YelM8wVtx0is4=; b=XEACYvYVyIIgiaIUAGQH2iIuCDyzPtdCxHzDxG/EcLenB0DblDiHnszhvJv3N+XkOY xxjaxvZijLaT5nVT0OASObnny1bllSy2hkEC0IGdGAeTIpebsYBCUrJwjgWDoeGACMa2 TnV6jAHCwp6HzpFDOCSjCnmnAP1pYQz5kAJMCwRvyOUGh4C3MRFzo98AwBtK76sxrGXK I3HrijV9ZsIX5xH2nZ6CSkWgHlEVp538FjgDL2jWXbQAGBguuIVfNI1WHIVk4n/M1exb +BGiA+f6nqXWc/8mhEptK9swduZgwmbzjcZpq8fLAA4NV59EzjE1xiDdXEod7dzHQLUo 1ZBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gsKAMDFB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020aa796a4000000b00638ec3a1ae8si5040507pfk.211.2023.04.14.13.12.13; Fri, 14 Apr 2023 13:12:28 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gsKAMDFB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbjDNUKZ (ORCPT + 99 others); Fri, 14 Apr 2023 16:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjDNUKW (ORCPT ); Fri, 14 Apr 2023 16:10:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 478E465B7; Fri, 14 Apr 2023 13:10:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD3DF649F5; Fri, 14 Apr 2023 20:10:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 3A3EBC4339E; Fri, 14 Apr 2023 20:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681503020; bh=VYAuLSJnEMAkX+vDzpaAVQk7hpPnKCfWHvAaAjXfvdg=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=gsKAMDFBUJWNqWSHN5AFNoRRNNjxJJjA1twtXZRN1g5o6D4g0KSxeQlWlqREaZs9R QwqR3/X7Qtuj2GE3OKnFVyrFwKAP558IR4NZ5ZRy9ILqYwsINt0HqX26X30OWTOO+W xGaBDqEqUvLesTgMCJpuNLoWVm/oKBJ1jg4WaVq2GgUD5fFE5AO4SgFUqMNLvcpKs7 TW6fLlardwox4xwOzefLmLf9tY4NGCuqkyrhSwWNQLZBi64Ls8c0hiE5smF6fr5F41 tUxvyZrwcB6c9RGOXazPqlzPnI09LtNbsftLKaVZSAuqxt56Fk8qNktuU3zJZSlpBS suxhv/VClWftw== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 21BA9E4D003; Fri, 14 Apr 2023 20:10:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] Bluetooth: vhci: Fix info leak in force_devcd_write() From: patchwork-bot+bluetooth@kernel.org Message-Id: <168150302013.15322.10506281113817205664.git-patchwork-notify@kernel.org> Date: Fri, 14 Apr 2023 20:10:20 +0000 References: <634ab328-3ef2-43b7-8f81-8a48c7661427@kili.mountain> In-Reply-To: <634ab328-3ef2-43b7-8f81-8a48c7661427@kili.mountain> To: Dan Carpenter Cc: mmandlik@google.com, johan.hedberg@gmail.com, luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Thu, 6 Apr 2023 11:55:17 +0300 you wrote: > There are a number of bugs here: > > 1) If "count" is less than sizeof(dump_data.data) then it copies > uninitialized data. > 2) If simple_write_to_buffer() returns -EFAULT then we run into a > problem "ret < count" comparison. "count" is an unsigned long so the > comparison is type promoted to unsigned long and the negative returns > become high positive values. That also results in copying > uninitialized data. > 3) If "*ppos" is non-zero then the first part of the dump_data > buffer is uninitialized. Using copy_from_user() instead of > simple_write_to_buffer() is more appropriate here. > > [...] Here is the summary with links: - Bluetooth: vhci: Fix info leak in force_devcd_write() https://git.kernel.org/bluetooth/bluetooth-next/c/0b1900708232 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html