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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 2E923C4332F for ; Fri, 3 Nov 2023 14:06:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C7962846; Fri, 3 Nov 2023 15:05:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C7962846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1699020369; bh=Ys3BfGLzHTQ2qxC2Kv8A4oVaOBn74Q6mnJ/R+F5Cr4k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QtMFJXzmh1Fw1tqCHmacQXQEcdF2wmyIub3hqTdC+1Vr/VwsRLp7pnwrhkCo2fyx6 RX8RSjczpgC6FX3wrW4uIExUE4Op9kBHs8t7galpeLz0DodSkIoiFtul6RkoHinFza D4TA2rrBifET0NOIXBiLSV0eVu40EoNJ83iR3RvI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6BE61F80557; Fri, 3 Nov 2023 15:04:51 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D6315F80557; Fri, 3 Nov 2023 15:04:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3DCB5F80290; Fri, 3 Nov 2023 15:04:47 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0DC22F8016D for ; Fri, 3 Nov 2023 15:04:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0DC22F8016D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=LR7Xtqvl; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=O11EzMLN Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 66BBE21865; Fri, 3 Nov 2023 14:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699020283; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K+phPigzxGcIPlXMe8J+907GIstYOns+/x2oh4L/kAE=; b=LR7XtqvlystAQ8cwpMpLw2H6ykoTS69ka/Sl8lFSfzZciz86hzDxRHwbkZq3mZrKFgTIB5 kLUhLiRhWARx++pb5r1RctZ8ammYjsVvVTaTUZf+UR7EuFs4uYoOPjNrDytizE7BXyHHeL rA9i3iGTLuxEQrdbhQ6yvSvgxi0XEYQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699020283; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K+phPigzxGcIPlXMe8J+907GIstYOns+/x2oh4L/kAE=; b=O11EzMLNUFg186nPO99/Q3JkE26DSNbgYJmvTxrNghs+XCTvXESxaOOTTLgSrDNMSDOP+A gwv0oqfxOKpMWGDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3C03413907; Fri, 3 Nov 2023 14:04:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oLK3Dfv9RGWfCAAAMHmgww (envelope-from ); Fri, 03 Nov 2023 14:04:43 +0000 Date: Fri, 03 Nov 2023 15:04:42 +0100 Message-ID: <87o7gbszk5.wl-tiwai@suse.de> From: Takashi Iwai To: Philipp Stanner Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Dave Airlie Subject: Re: [PATCH] sound/isa/wavefront: copy userspace array safely In-Reply-To: <87pm0rszup.wl-tiwai@suse.de> References: <20231102190309.50891-2-pstanner@redhat.com> <87pm0rszup.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: BSTZQTCC7XY37IGIBZLMZERJHXFQHUDS X-Message-ID-Hash: BSTZQTCC7XY37IGIBZLMZERJHXFQHUDS X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 03 Nov 2023 14:58:22 +0100, Takashi Iwai wrote: > > On Thu, 02 Nov 2023 20:03:10 +0100, > Philipp Stanner wrote: > > > > wavefront_fx.c utilizes memdup_user() to copy a userspace array. This > > does not check for an overflow. > > There is a check above the memdup_user() call; it's at most 512 > bytes. > > > Use the new wrapper memdup_array_user() to copy the array more safely. > > > > Suggested-by: Dave Airlie > > Signed-off-by: Philipp Stanner > > Although the check is already present, it's still better to use the > new helper, so I applied the patch now. ... and the helper is available only on Linus tree for now, so I postpone after 6.7-rc1 release, so that we can have a solid base. Takashi