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 DF957C4167D for ; Fri, 3 Nov 2023 14:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377865AbjKCOFC (ORCPT ); Fri, 3 Nov 2023 10:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233470AbjKCOE7 (ORCPT ); Fri, 3 Nov 2023 10:04:59 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D924110C6 for ; Fri, 3 Nov 2023 07:04:45 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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