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 58355C4332F for ; Fri, 3 Nov 2023 13:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377680AbjKCN6c (ORCPT ); Fri, 3 Nov 2023 09:58:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbjKCN6a (ORCPT ); Fri, 3 Nov 2023 09:58:30 -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 8A87D1BC for ; Fri, 3 Nov 2023 06:58:24 -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 C63CD218E4; Fri, 3 Nov 2023 13:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699019902; 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=IWvTVIfzxqo7HC5kMHZmahlO81FTRnR1EO1pSWh2HWI=; b=lV0X33ItHYWgx2s1cdyTsX3ovLD3s0j/gAgBo0SRXtgLyXPmyJ8bgmFaX2+CEIi9gvpKGF y8X5+U2SPW6IlMI3tzRgPDQccA1OD6HF+yNTUpy5e4GO+P/sjJO33QFos6ewfw6wmZRYq6 C6b76s86sfOi+LOmLy3C7ebPiMwgKlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699019902; 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=IWvTVIfzxqo7HC5kMHZmahlO81FTRnR1EO1pSWh2HWI=; b=eSm4LnF/Yb28DDXkRgfVjeroL3KdzJBI2EUif/G0jQeYG62Ug8TL4l+f9DtzPDZwKQ0iRJ k9LTlkqjOpy7UVCg== 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 97CB213907; Fri, 3 Nov 2023 13:58:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id RIsqJH78RGVlBQAAMHmgww (envelope-from ); Fri, 03 Nov 2023 13:58:22 +0000 Date: Fri, 03 Nov 2023 14:58:22 +0100 Message-ID: <87pm0rszup.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: <20231102190309.50891-2-pstanner@redhat.com> References: <20231102190309.50891-2-pstanner@redhat.com> 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 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. thanks, Takashi