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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 198CEC04A6A for ; Thu, 10 Aug 2023 15:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mWXgFLfKADEDuj4zWQFzXHnGCyOLtmkny9SFVvYwdjg=; b=MAEcHRSQajNWHF MImozNmThSwG/3ADwCsLA+oc9FJfprocBcIgNr7w0D9weiTyD5cYgRnoxGd01uV7Inmp3sat1pm7R 3FjBJVzKlYKPTjwib+bjyRAWqJDtGj7WR55nW3fim6qqL6JRMp950fZHCAoCFeCqEg3S2T8L4dX5s uGGgoFIeu2b514PrnmdYl1P4CjvMDggr7Eo8AvMf3YHEWjMoq+Ry3LCeXhE6bOFmuwGcMBfWQK0oD 2prpH0T8u1B0rb90bWRtNDhx9QFmYGgq1nSBs/bU7CfVuuFFZbJiWoqHvM06zF5UZhqLlRwuIKx6m ggtENV+2X20cQPg05NHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU7up-0085We-09; Thu, 10 Aug 2023 15:49:35 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU7un-0085Vs-0t; Thu, 10 Aug 2023 15:49:34 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B9FA660F1; Thu, 10 Aug 2023 15:49:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8047EC433C7; Thu, 10 Aug 2023 15:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691682572; bh=7JZ+hjiGnW6zlgnmFdgRvS45F6iLlcnWLPDgR5IUKPU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hRrAvjEGrOfwyKQm5uaZj1BWRp0OibK4wDpl/exdaLQEATqBt/bTkHphCxjUyc983 T/hqV+eu+Y6kEbPvq8rdci27BgFTSvEi2trukbFD+4dOci13LG1YzZ8nCs6Fe4eZpS zNDaydwuH9FowoERk/VycQ6pZC3JyQsQJwv/P+ME= Date: Thu, 10 Aug 2023 17:49:29 +0200 From: Greg KH To: Eugen Hristev Cc: Wei Chen , tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, yunfei.dong@mediatek.com, mchehab@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH v2] media: vcodec: Fix potential array out-of-bounds in encoder queue_setup Message-ID: <2023081004-stout-blanching-6f17@gregkh> References: <20230810082333.972165-1-harperchen1110@gmail.com> <45d0f538-9769-f4eb-7479-cf676337ff55@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <45d0f538-9769-f4eb-7479-cf676337ff55@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_084933_354935_B71F2008 X-CRM114-Status: GOOD ( 14.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 10, 2023 at 12:12:39PM +0300, Eugen Hristev wrote: > Hi Wei, > > On 8/10/23 11:23, Wei Chen wrote: > > variable *nplanes is provided by user via system call argument. The > > possible value of q_data->fmt->num_planes is 1-3, while the value > > of *nplanes can be 1-8. The array access by index i can cause array > > out-of-bounds. > > > > Fix this bug by checking *nplanes against the array size. > > > > Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") > > Signed-off-by: Wei Chen > > Cc: stable@vger.kernel.org > > --- > > Changes in v2: > > - Add Fixes tag and CC stable email address > I guess stable needs to be added by the maintainer, not by the submitter It's easiest if it is added by the submitter, makes the maintainer's job much easier. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel