Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4464552pxa; Mon, 10 Aug 2020 09:38:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytBG9rYwxUqPfiYglgS8nSTeaRj36WdjwzVFdTRnfRocoCr2ox1rnIczK3ekfct0XbjQQg X-Received: by 2002:a17:906:5246:: with SMTP id y6mr22014622ejm.316.1597077516758; Mon, 10 Aug 2020 09:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597077516; cv=none; d=google.com; s=arc-20160816; b=UUGRK/EooaZVOQmbBENgOVXThi5rVbH5u5XQTQsBcJPIDyJ3/ao+cxrLT6YGa36jYl syDdM9RWzv2SUlcBWScciuQP3Ic7AHIpqknoDHQoHryFs67AZuHoNgip/PimhxWetPa8 hK1W0p1mBCfkZf3od7CZNYblnk6DnqHW5Vqp3h4LeuBaderqTiE2dUiSUymTyqbPDNy9 pIIRNXr02iomxJWL/SCmb37S6FMwIW4BHLyTVCIZYcQgC0u/o7tCYPG0jQ0awISldS9f qIPEPPPDYZSZa1iRYZPVWfSnMt5qMJNSnRZnHZ2uLH7+jTUU/b264dA//Ip1oOzESJWf pLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=f3/7T7eiSFAW29SyJU3OJs9vRO11N1A4ppNbcctzdy0=; b=VtRlgQan7ck3IBbbbcSsJq9t3zxyrxWeASdo2tgmR+hOZ8eNKfumxL5qNmXtnv8ePH m2A2xpqhESeBQZh4hPzCZByZET5t7LncATpyOZV7NcavaRyApLWmwOf9te2X5u8XlxNM H9D5KRuRyT+SUxhPsiyJQPORgC9XxlwlKewZXGo6n1Myg5SuSNbo5ytjSLxBuP7qV6gp nVta6gZuGDgCy0MAMzdmrpNSbz3PN23VsgWb5bWjnrCcvx4hfU8qHqWUlAlKemofZjEF q9KqZJJHQ2gShwZFVKPNEWg1+Xb+LqBbYiy4HQvRxECQbP/UpmkQYZgkWC8Hy6y+j5bp Pvag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si12205460eje.469.2020.08.10.09.38.13; Mon, 10 Aug 2020 09:38:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727939AbgHJQhV (ORCPT + 99 others); Mon, 10 Aug 2020 12:37:21 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:47400 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbgHJQhV (ORCPT ); Mon, 10 Aug 2020 12:37:21 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 6737A1C0BD6; Mon, 10 Aug 2020 18:37:18 +0200 (CEST) Date: Mon, 10 Aug 2020 18:37:17 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, syzbot+1a54a94bd32716796edd@syzkaller.appspotmail.com, syzbot+9d2abfef257f3e2d4713@syzkaller.appspotmail.com, Hillf Danton , Takashi Iwai Subject: Re: [PATCH 4.19 06/48] ALSA: seq: oss: Serialize ioctls Message-ID: <20200810163717.GA24408@amd> References: <20200810151804.199494191@linuxfoundation.org> <20200810151804.528955642@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20200810151804.528955642@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > commit 80982c7e834e5d4e325b6ce33757012ecafdf0bb upstream. >=20 > Some ioctls via OSS sequencer API may race and lead to UAF when the > port create and delete are performed concurrently, as spotted by a > couple of syzkaller cases. This patch is an attempt to address it by > serializing the ioctls with the existing register_mutex. >=20 > Basically OSS sequencer API is an obsoleted interface and was designed > without much consideration of the concurrency. There are very few > applications with it, and the concurrent performance isn't asked, > hence this "big hammer" approach should be good enough. That really is a "big hammer". And I believe it is too big. In particular, do we need to drop the lock while sleeping in SNDCTL_SEQ_SYNC: =3D> snd_seq_oss_writeq_sync ? Best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl8xd70ACgkQMOfwapXb+vI+owCfQmddRMmcmzR8eZPLBZ+wUZ4E LJMAoIUocqpHQx1an8GYl2ZNOkFDfd8G =cdfu -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--