Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3BF9C43381 for ; Wed, 27 Feb 2019 14:13:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B07122133D for ; Wed, 27 Feb 2019 14:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551276792; bh=Aegf7W3WgC9SKcl5Ef/0A1wEIDX4yq4vE5QOhuZaXZ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=fiVjpOJWaIG4rMrbJETJWvddrjN+u3Gt9qZMistPKoNg51nQX3fi06N+BFThbZnB6 fA05glfAeCh0bvcATTkkkdBKQnQ1mzFPCYRGMzSLy/RCH6WLbjxMAAHPICSurURpN+ kW6ugRnvGiApKd15SZd/ejemUm5Vjgl8RdDKaLEE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730149AbfB0ONM (ORCPT ); Wed, 27 Feb 2019 09:13:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:38134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbfB0ONM (ORCPT ); Wed, 27 Feb 2019 09:13:12 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE01E2133D; Wed, 27 Feb 2019 14:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551276791; bh=Aegf7W3WgC9SKcl5Ef/0A1wEIDX4yq4vE5QOhuZaXZ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bFnteU/j1kubaGYl8cpbvA5bMW9bfC7Q1GNyq7xshsd8FTgEd1xLe/wn/WnoL7QxL PPBu3vxu2CjUQWi4RycSgCJJwvmQ5oQM7jxcb4Y5XU8JwFB+A+3x7tsWRKxP1Tp34J sJnRw5vjvH4L8jk2PuYoJ5e3SR7rf9+uOxjdakiY= Date: Wed, 27 Feb 2019 15:13:07 +0100 From: Greg KH To: Ilya Dryomov Cc: stable@vger.kernel.org Subject: Re: [PATCH 3.18, 4.4] libceph: handle an empty authorize reply Message-ID: <20190227141307.GB10320@kroah.com> References: <20190225201206.30079-1-idryomov@gmail.com> <20190225210228.GC12242@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Feb 26, 2019 at 10:39:46AM +0100, Ilya Dryomov wrote: > On Mon, Feb 25, 2019 at 10:02 PM Greg KH wrote: > > > > On Mon, Feb 25, 2019 at 09:12:06PM +0100, Ilya Dryomov wrote: > > > The authorize reply can be empty, for example when the ticket used to > > > build the authorizer is too old and TAG_BADAUTHORIZER is returned from > > > the service. Calling ->verify_authorizer_reply() results in an attempt > > > to decrypt and validate (somewhat) random data in au->buf (most likely > > > the signature block from calc_signature()), which fails and ends up in > > > con_fault_finish() with !con->auth_retry. The ticket isn't invalidated > > > and the connection is retried again and again until a new ticket is > > > obtained from the monitor: > > > > > > libceph: osd2 192.168.122.1:6809 bad authorize reply > > > libceph: osd2 192.168.122.1:6809 bad authorize reply > > > libceph: osd2 192.168.122.1:6809 bad authorize reply > > > libceph: osd2 192.168.122.1:6809 bad authorize reply > > > > > > Let TAG_BADAUTHORIZER handler kick in and increment con->auth_retry. > > > > > > Cc: stable@vger.kernel.org > > > Fixes: 5c056fdc5b47 ("libceph: verify authorize reply on connect") > > > Link: https://tracker.ceph.com/issues/20164 > > > Signed-off-by: Ilya Dryomov > > > Reviewed-by: Sage Weil > > > [idryomov@gmail.com: backport to 4.4: extra arg, no CEPHX_V2] > > > --- > > > net/ceph/messenger.c | 12 ++++++++---- > > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > What is the git commit id of this patch in Linus's tree? > > Commit 0fd3fd0a9bb0b02b6435bb7070e9f7b82a23f068 upstream. thanks, now queued up. greg k-h