Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754892AbbKXS0D (ORCPT ); Tue, 24 Nov 2015 13:26:03 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39348 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729AbbKXS0A (ORCPT ); Tue, 24 Nov 2015 13:26:00 -0500 Message-ID: <1448389547.27159.8.camel@decadent.org.uk> Subject: Re: [PATCH] RDS: fix race condition when sending a message on unbound socket. From: Ben Hutchings To: Quentin Casasnovas , santosh shilimkar Cc: lkml , Vegard Nossum , Sasha Levin , Chien Yen , "David S. Miller" Date: Tue, 24 Nov 2015 18:25:47 +0000 In-Reply-To: <20151103112545.GD921@chrystal.uk.oracle.com> References: <1445008302-14169-1-git-send-email-quentin.casasnovas@oracle.com> <56213845.6020900@oracle.com> <20151103112545.GD921@chrystal.uk.oracle.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-a4CKAiLxbcSunNHKoquy" X-Mailer: Evolution 3.18.1-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.4.247 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2943 Lines: 78 --=-a4CKAiLxbcSunNHKoquy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-11-03 at 12:25 +0100, Quentin Casasnovas wrote: > On Fri, Oct 16, 2015 at 10:47:49AM -0700, santosh shilimkar wrote: > > On 10/16/2015 8:11 AM, Quentin Casasnovas wrote: > > > Sasha's found a NULL pointer dereference in the RDS connection code w= hen > > > sending a message to an apparently unbound socket.=C2=A0=C2=A0The pro= blem is caused > > > by the code checking if the socket is bound in rds_sendmsg(), which c= hecks > > > the rs_bound_addr field without taking a lock on the socket.=C2=A0=C2= =A0This opens a > > > race where rs_bound_addr is temporarily set but where the transport i= s not > > > in rds_bind(), leading to a NULL pointer dereference when trying to > > > dereference 'trans' in __rds_conn_create(). > > >=20 > > > Vegard wrote a reproducer for this issue, so kindly ask him to share = if > > > you're interested. > > >=20 > > > I cannot reproduce the NULL pointer dereference using Vegard's reprod= ucer > > > with this patch, whereas I could without. > > >=20 > > > Complete earlier incomplete fix to CVE-2015-6937: > > >=20 > > > =C2=A0=C2=A0=C2=A074e98eb08588 ("RDS: verify the underlying transport= exists before creating a connection") > > >=20 >=20 > For reference, this has been assigned CVE-2015-7990 on the oss-sec thread= : >=20 > =C2=A0 http://seclists.org/oss-sec/2015/q4/179 But the patch doesn't seem to have gone anywhere. =C2=A0Santosh, can you apply this in your tree and ask David to pull, or should Quentin re- send it to netdev? Ben. --=20 Ben Hutchings Unix is many things to many people, but it's never been everything to anybody. --=-a4CKAiLxbcSunNHKoquy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVlSrq+e/yOyVhhEJAQrH3RAAqE8MiiSKo1kxfvkep/CtIwhFtIIZOYWW uxzyBI1aHhFkWryiBNO4Q/9O7nCaDUIjRb+7H/HZ480imytsYzwadbrar8AfXicC YdCNxgjqLhv/3nilJa98RCNNRH+j5LUFfQJaRjnZmFMeFx5Sy6vSSXbZA2EarLLn O/7loV5pmW/U475oO+Q8nPGjcLZRjYGdXIOkG3XNTWlefnDkxjOLrhQgztlAqBWe mMDYRol1re+WUzMGxEvKeTshQ3Xx85wnTyQV/p5kcjxygpP+w7Cxh90wVCNz1r9j Wx2MBW5n2h+OnKccHqq6xzK6v4RVFGST6AiS094yJ/4HqHsq/nazvAXa0lmbSCmd HOB7XZXG9WIrdVnolPvWPhCavw5d02QLFt9P1JWmDAME6zuaJSZJq6Vrzm4//6Zb xqM0CfToYul20kyB8qqmIvvYsc0YMWIDSgD9ueGQf5ZKETUBwpkrqq5stKXHScue 6WmiSdLSxSnSxoRnTGBljVNGh3kJJbxKXngbbCaR/LKXVOmzrHT+gDWKQLF2vXrw XAJZlQFJFpbmjhn92Z6H54meC92VfFB3VmHzsZEr2g31AixXwlxEgd0Tjdy9APR4 dUqey+yDP9JlDXDtmwQsXJ3pCNgTuB3J/ETgzN09HdweF4Amnz4dCks3OUyEDXlQ 2Fou5InWEok= =bTZP -----END PGP SIGNATURE----- --=-a4CKAiLxbcSunNHKoquy-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/