Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp505329rdf; Fri, 3 Nov 2023 07:06:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXob2MqqXBzfsHHJKeJ67AL5QiDV69zBj4MNmPPmj69GkE6Dmixc0fBxNPKEVP6UIGJpFg X-Received: by 2002:a17:90a:3ea5:b0:280:c316:63e1 with SMTP id k34-20020a17090a3ea500b00280c31663e1mr7119533pjc.41.1699020410035; Fri, 03 Nov 2023 07:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020410; cv=none; d=google.com; s=arc-20160816; b=bWUdeUgubFqLWAi4aPwQKwX5AodxRSBKt5D4z0yqmBAHPn6T6IyQYOJ7ccsVmT/8aK GMUbuPXDANR8li7yt7r8Zqm2Y9KAiK9hlsiBfvrXzdx7L7hDWsypEgeVYAmPa3nk05iS MoXL+1iLsY0UlwmHvx4ZqXKEaXsbUCMzKAh4tsGJP9lPzMNdjom45v0f4/2Xrh5MP43+ poOrQuhoyls39UVvY3mn0uxiiTO8NOYsn72N0xOTcqLDlU4Pka2APZB7DCYNKokeu71a XrnAfhuqz7Rl5O7IzVqHO6MkmJBACiKAjL09dZLIhjxCqNCFB+TEV08RGqUk3480q/hL ZNjg== 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=K+phPigzxGcIPlXMe8J+907GIstYOns+/x2oh4L/kAE=; fh=Rg0efnJrozDXTYQflyJVZdkOgxQTWxsDx9Hx2MM2W1s=; b=eqVyCjBPd0GvBxoshTIZ3Vgdw13z6LLXHeAY9bB1Vdz+kiRc7QWjdQ5PkmXdSeqpWD oPqXV0PZUFmYJyJR2O1vfA+e+dkEiUoGv28ky5/dvKp05sH458sSYMBZX2rGGeAgeRj2 TBaAjztA/+PmmIHt/KCtMy7EAnkSgnZZEJkhsJ5NdmSp7DYcd9r7P1nPUKAdjOoRcdzY pO5RaSi9t9RNu1RuErNupZeWSly0m+pHt86Z5VjG9Duay+TPXisUPLWz2gBmfhQ8n6r3 08a/9ICZR9gVcKkiMyrJyQst07EaNmzA/VaJ03EUi64NtRIRa5Zc/5qZ0Udwceok4BPM 8d7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LR7Xtqvl; dkim=neutral (no key) header.i=@suse.de header.b=O11EzMLN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id pf1-20020a17090b1d8100b0027ff63ac6c6si1599298pjb.28.2023.11.03.07.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LR7Xtqvl; dkim=neutral (no key) header.i=@suse.de header.b=O11EzMLN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 69BE5807EB0E; Fri, 3 Nov 2023 07:05:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377770AbjKCOFB (ORCPT + 99 others); Fri, 3 Nov 2023 10:05:01 -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 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:05:49 -0700 (PDT) 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