Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp497977rdf; Fri, 3 Nov 2023 06:58:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJPOhYmBVtLComNWLa6aqy4vzRmJBophXslEiQSQDDoKxeGkUUiKkpknNhGmkURY0kMEZL X-Received: by 2002:a05:6a21:a581:b0:17e:4f56:ebe3 with SMTP id gd1-20020a056a21a58100b0017e4f56ebe3mr3622705pzc.10.1699019928717; Fri, 03 Nov 2023 06:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699019928; cv=none; d=google.com; s=arc-20160816; b=qHI9KgWziAOvx9kkb6WO5GgRWWOP2D5rPM3WVMmy9p9DgYw3RROXpwS3+0bLoYjTaV bIgzexBM8jfdizkMBa+DYEgep+uQLkREAlDY4mOTmsGeWkCs1XKzoyYdKrdCHTZ02WDd MA3vURZUJH60SJqSGZoErhLa3XiFtlU/aKpGy+3Ej9OBaw3y6A0VMnDLuiwUcLnLfAEW eS1PD87zNgrIPtWFQOnEDTARMNh3uJtXN8R7eE8ykZMiAClh+qBcfkwDhqZXDFlpIB/9 irOalJCM6OuCYtFyYT5s4cEoKm0vVBOYSyV/WOBr5n/mgeZZNR6TKXMSVI4INSYP2E/4 Yzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=IWvTVIfzxqo7HC5kMHZmahlO81FTRnR1EO1pSWh2HWI=; fh=Rg0efnJrozDXTYQflyJVZdkOgxQTWxsDx9Hx2MM2W1s=; b=aKGvJXY3K/ItgeG19KGnBd0OniAWK0HVfValOcpvgcsL49fyXOhiszEKLGZH3VkFhS t+tZCOEZHXqBvhOE3R/N++9Yfcjoj4ml7kB4SH+McMv0VLkduGZ95Hr3LiulOI+1WAYB 4QV7AcbElq773iDipZqhUL22iUlp0k24InCVnY9uhWt/nNJbNLaO1Xk3HR21pZoJzk3z MPSn3R9tRlfcn7EmBcahM5gQFIQ2fc6g3pn2tf2OkDWvUwQnNI6dCMt+WihPIj5RVk6D s7dnnCW/TEzDuSBrcJzatWFEtOl7/P8+/r2w3qYtqzRLSDUZ3r/HK6x+rIuwnmwtB4Wp JGPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lV0X33It; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w190-20020a6382c7000000b0059ccb99a2eesi1554800pgd.173.2023.11.03.06.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lV0X33It; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A2622808BD83; Fri, 3 Nov 2023 06:58:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377661AbjKCN6b (ORCPT + 99 others); Fri, 3 Nov 2023 09:58:31 -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 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:58:43 -0700 (PDT) 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