Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4278144rwb; Mon, 31 Jul 2023 04:41:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHSUYIrSktzLWG8ybYgEQ0ZdCd3Avkrx5i0hWGG0SGnGxr4lxeJpzOVCbfMogFwB68BvCO7 X-Received: by 2002:a17:903:1ce:b0:1b8:88c5:2d2f with SMTP id e14-20020a17090301ce00b001b888c52d2fmr11067754plh.64.1690803661226; Mon, 31 Jul 2023 04:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690803661; cv=none; d=google.com; s=arc-20160816; b=L0IVfYuhhuqN9G3dPv+Jtpx3dQO/lc+LY/cEL4aW2EijBxsQsAAJsV2KzpSNo0/9Ip EqwoejYqBqOKW7XUmYWCUm7Hsa9On6a1F/7weEN2QB37gnN76yJ/OLmzoYanmXgtVM26 UUWOz+q68NJAPoZoY1oIPi3IugsyxhOKBjN4e29inKn3IGc8UlN/GhE4drEp/P9cwmju d3FrXRgenO0+ebvTnuFhVZhE+dC2GXH4OPN+oMJin4jBNavCW8i0l1qMnpT+wyR1MW3e InAjclptwepCUo1L0SOS8jqFthPusGHi5xH2sIDZCMBFtets47QM1FvA6yD7vyams1jt t0YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=wRPl8ExMEKGkKxc8JLVP1HjAhzRX7LhJPQ6yu58Jr+8=; fh=2Q7OBVS2xGU4rkEL1bObw+hbMF8BBH1VP8ScmDKr+TI=; b=ZjyGGX/ko4PatBBGYGYDrf4wPgTG51NffUvUcN658Mfmc/fyO8uTyXnclgE8YDTMIl +syhbVAjnfIR1u3bqnaSnBLgs0sQCTCCoyXILh4QviuiPm5jrm56zWjVz7pznuX3R03V W9+Z+i5uqs8yuo81ChgGyBcl9Besh1ID/F3msXlIBLlLcZVpUdwqtHSOFzIP6tcIfNMv 82AqIoIRiRUfv5asaGTqM3iUYTCmZBFlw7dF4zBCMyN3wnyBGPLQSX9XydDKlVn+MSAx ogteEcKB6MXzH0vxX1+k9eWbs1xsYotH+laNOn10kIp/6eWrHUZsR9TKM+XtK026xa00 mb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=egSCwLPG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a170902ec8c00b001b9c120a39csi7451368plg.357.2023.07.31.04.40.48; Mon, 31 Jul 2023 04:41:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linaro.org header.s=google header.b=egSCwLPG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232313AbjGaJUr (ORCPT + 99 others); Mon, 31 Jul 2023 05:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232217AbjGaJUP (ORCPT ); Mon, 31 Jul 2023 05:20:15 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F11FC10D3 for ; Mon, 31 Jul 2023 02:18:33 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9ba3d6157so62173441fa.3 for ; Mon, 31 Jul 2023 02:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690795103; x=1691399903; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wRPl8ExMEKGkKxc8JLVP1HjAhzRX7LhJPQ6yu58Jr+8=; b=egSCwLPGdbnxqM64YT6dE5oe7lKSwA62hHGnI98l4e/LQc2zzrG2ZEh44DsRvzk3zl pgauphOAP4esHRpaJ9NeSki5u3yim7Jc0SThqCg2N35Msk1MvajdM8cXkWb9gxiCdw3D MnvBJPzgfRXL0EXwZJhjbxtaBCe/x86dNCyMx0ZsBqO4FMT2UKvXojgZOzH5nU4l4mIY 36yw8U7e0Vs1QE6hnAqh2wOOTt2khpmqIfH/SYt1s8cui4q0V9e6YLbsDTS+WpJEgi2b sOxyAufDeatZUEdsRzgnzMOjV9XjEkraK6vwx49P2qeyztY0HY4RuyCALJGynfQvDnhM Mueg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690795103; x=1691399903; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wRPl8ExMEKGkKxc8JLVP1HjAhzRX7LhJPQ6yu58Jr+8=; b=EwvG1gyhb3g7ekHF2q7tn8R3SP62OOlsbheiF6CjNqVdz7+8WS3ygCgg0olB1j0A4U bgDFEFCNW61kI1KCll3E6+/j1aG3wGHv1nfJ5DOKUcoT0Xpag0sJM21NlmvoA4EaZoWO 8kmgJEGYloBBgV4AF+xflA3rxhjXLovtMIbVdQber/x3V8D29L6hN6Re2HQ3+xGa9P4e lmhzBG4YVKhNMxGwwtvHXajoj/ad0/qQqTpNenYDxI1w9bXZLNu6OHES/YiU6ikqENOD gc8QC8+3VY71s1195wF1UGbAAFnq7XQW/h742Z8Mrd9UyZ6t1/bY7zygJUXW6lNUspnQ 47aA== X-Gm-Message-State: ABy/qLYB9dhaKiSzlqi1ALXwIlnREFWtMl+BOFkQvfhOxf4XEN3pmv/5 dlOlBUwzIPBpq1dUk3J0cU88uw== X-Received: by 2002:a05:651c:206:b0:2b9:c4ce:558f with SMTP id y6-20020a05651c020600b002b9c4ce558fmr5669884ljn.37.1690795102996; Mon, 31 Jul 2023 02:18:22 -0700 (PDT) Received: from [192.168.1.101] (abyk53.neoplus.adsl.tpnet.pl. [83.9.30.53]) by smtp.gmail.com with ESMTPSA id i26-20020a2e809a000000b002b9cc2f5c39sm2107563ljg.37.2023.07.31.02.18.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 02:18:22 -0700 (PDT) Message-ID: <4377ba5a-deab-1f24-c785-c90965991af1@linaro.org> Date: Mon, 31 Jul 2023 11:18:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soc: qcom: qmi_encdec: Restrict string length in decode Content-Language: en-US To: Praveenkumar I , agross@kernel.org, andersson@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: quic_varada@quicinc.com, quic_clew@quicinc.com References: <20230731091408.2458199-1-quic_ipkumar@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9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408.2458199-1-quic_ipkumar@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-kernel@vger.kernel.org On 31.07.2023 11:14, Praveenkumar I wrote: > The QMI TLV value for strings in a lot of qmi element info structures > account for null terminated strings with MAX_LEN + 1. If a string is > actually MAX_LEN + 1 length, this will cause an out of bounds access > when the NULL character is appended in decoding. > > Signed-off-by: Chris Lew > Signed-off-by: Praveenkumar I > --- Fixes + Cc: stable? Konrad