From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D69EFC0502C for ; Thu, 1 Sep 2022 10:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234206AbiIAKdU (ORCPT ); Thu, 1 Sep 2022 06:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233027AbiIAKdT (ORCPT ); Thu, 1 Sep 2022 06:33:19 -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 4C4C412206D; Thu, 1 Sep 2022 03:33:19 -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 DF31C61CE6; Thu, 1 Sep 2022 10:33:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66689C433C1; Thu, 1 Sep 2022 10:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662028398; bh=BiuK04+CE8YoYewJRijQZYZ40574bNvs7fZjdplgJJI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SKHwIPNDOiB0UORbMxLK20HkTEJpVICgTJR7jYCwr+8xIf6qY7tcxGLtUtHBXz/iq 0d22GeqWlfXoCsZwgKbbdX/kAzSrAzLSMvjFH1O4tJ/AtIMvocKMwn97Via5a8xk2i HEbz2VlkNzvqATaEOnjNz8Q8GANiA7ilxRRMNMLpjOCijczub97HWarGF7v0GDqnP+ jwJQy5cppwJ/Uvn1dVwlkWxi+PZ2qltBOn0iSc6ZiM1R7JeOreXVh2SahOBLiQFsed 0vMPtynh2ZUStUJfxZb3e5Iy96FO4DqLjCFaKKvYtjJm5RJ/2JMBjDj6P2da/0MfXJ 01PkhG8rtuaVw== From: Kalle Valo To: =?utf-8?B?SsOpcsO0bWU=?= Pouiller Cc: Dan Carpenter , linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] wfx: prevent underflow in wfx_send_pds() References: <2729343.a3EqFhE7eK@pc-42> <87a67ndokl.fsf@kernel.org> <37769865.10thIPus4b@pc-42> Date: Thu, 01 Sep 2022 13:33:15 +0300 In-Reply-To: <37769865.10thIPus4b@pc-42> (=?utf-8?B?IkrDqXLDtG1l?= Pouiller"'s message of "Mon, 29 Aug 2022 19:12:40 +0200") Message-ID: <87r10ve650.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org J=C3=A9r=C3=B4me Pouiller writes: > On Monday 29 August 2022 18:03:38 CEST Kalle Valo wrote: >> J=C3=A9r=C3=B4me Pouiller writes: >>=20 >> > On Friday 19 August 2022 07:23:43 CEST Dan Carpenter wrote: >> >> This does a "chunk_len - 4" subtraction later when it calls: >> >> >> >> ret =3D wfx_hif_configuration(wdev, buf + 4, chunk_len - 4); >> >> >> >> so check for "chunk_len" is less than 4. >> > >> > This patch also ensures that buf[4] won't overflow during: >> > >> > if (buf[4] !=3D '{' || buf[chunk_len - 1] !=3D '}') >> > dev_warn(wdev->dev, "PDS:%d: unexpected content\n", chunk_num); >> > >> >> Fixes: dcbecb497908 ("staging: wfx: allow new PDS format") >> >> Signed-off-by: Dan Carpenter >> > >> > Reviewed-by: J=C3=A9r=C3=B4me Pouiller >>=20 >> BTW J=C3=A9r=C3=B4me, as you are the driver maintainer you can use Acked= -by. > > Reviewed-by does not imply Acked-by? Acked-by has "stronger" meaning and is meant to use by the maintainer of the code in question. So anyone can use Reviewed-by but only the maintainer should use Acked-by. My preference is that maintainers use Acked-by as then I can easily see from my patchwork script that the patch is ready to be applied. https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when= -to-use-acked-by-cc-and-co-developed-by --=20 https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes