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 2E390C77B7C for ; Tue, 9 May 2023 18:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234905AbjEISH2 (ORCPT ); Tue, 9 May 2023 14:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjEISHZ (ORCPT ); Tue, 9 May 2023 14:07:25 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C560E10C2 for ; Tue, 9 May 2023 11:07:23 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 349GgReT028290; Tue, 9 May 2023 18:07:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=mVQZRuD+3P2r942mwHwPs57XW9EIasfEdq69rorUZAk=; b=RJ+iP4UJSK48LBKOGpe5CN3lxw4UaVVYKM+iHG6HXagjn2pHdJhR20MxankyDXDI3SUq cn/JGKK+/8vcwkwih92Per7/+ijf3e1EbBQWa1GReSBOljTiWgCx8123ZKpRMDkDw3ZW xVjISRPFunfB3Jj1jg1eBi3MWd62qXFuoAkzFiwYg2vMjfff64PeI3gKaDwxmWy8ve93 NklmtABcBDg1I0LH9PqezdIyYh0m6cbxcR7FMnFmlZWLd0BBTo1KA5k2dSOpZj7Vn9tp AvNfgd/tkc9S/cSoN8ZAmiSpiJ8BjAq6Ap6pqrsSmOaw/nXs2jvsnvWxz6dy/vcxzsDg HQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qfr508hbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 May 2023 18:07:01 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 349I70Ge016716 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 May 2023 18:07:00 GMT Received: from [10.216.0.143] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 9 May 2023 11:06:57 -0700 Message-ID: <94a81b02-e8e0-3b99-f63b-aef288790c82@quicinc.com> Date: Tue, 9 May 2023 23:36:46 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] ASoC:codecs: lpass: Fix for KASAN use_after_free out of bounds To: Mark Brown CC: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "moderated list:QCOM AUDIO (ASoC) DRIVERS" , open list References: <20230509103232.20953-1-quic_visr@quicinc.com> From: VISHNUVARDHAN RAO RAVULAPATI In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MOzKdvGzFMlCiX5w2XRUJWaq9xZ80NnM X-Proofpoint-ORIG-GUID: MOzKdvGzFMlCiX5w2XRUJWaq9xZ80NnM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-09_11,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=440 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 impostorscore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305090150 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/9/2023 8:06 PM, Mark Brown wrote: > On Tue, May 09, 2023 at 04:02:31PM +0530, Ravulapati Vishnu Vardhan Rao wrote: > >> val = ucontrol->value.enumerated.item[0]; >> + if (val < 0 && val > 15) >> + return -EINVAL; > Srini is right that it'd be better to read the upper bound from the > control, that way it can't geto out of sync. Will address and resend it.. Thanks for review.