Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11809723pjo; Thu, 2 Jan 2020 14:39:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxTts9QwTkbTmuyAyV+tdoi1tOTZUyrcg3NCyOb/lT8m9e2pwUpK/OCiBLLLY0mfwx3E8UY X-Received: by 2002:a9d:6196:: with SMTP id g22mr97975566otk.204.1578004794930; Thu, 02 Jan 2020 14:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578004794; cv=none; d=google.com; s=arc-20160816; b=aitNodRkUTxqcL3ICON1ekTwaGUBdXmjGVYluoXmLeSYwKyayzAFeNpiTRxSGzZzv4 0FgOALlEMresH/NmqpHFgppSvHGg0r1rNcTqaNZ+w2Pf7RNUIrglqwvuAlR9Lz9ZVFer 8JV5yUu8G1+pPMx2YjJ+pahDwDA0REnnMsnudvu0GIrQIpYL7/tGuZ/UFjnRmx3mthwS o3RVK/pNODvxFyMoFceL/m5X33qNZ4JZFkBcas4a9kYP5y0P5mvAcfe4OW43Rw5b2Sq0 Q5E38vBGnQey5HXokZALKY0BqnzWF4rtpTEhWeDqQx0uaVbqs6hup/giEJBv+nnp7mv3 iGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fl2rU/g9VfKezQn8TLNhGmxqX56JndfFJ5u9Fga99LE=; b=W7Vkj5hX0640gQQWlxXQpqUqkZ7iaaKKviD7O0VIme+CVRZPDx47AO7phs8K+9aNmq BcBsW/GiY7I+zOnzY50zLz0PjRdXLTa1qJ7xqxtSIjHq1XhPdkLrwOgqwmgT/iVh9Gvr 3zd5T3Hvu8e+1Z/igAWE8Q4wScTVKSYKBwEoYkI4txFU7uNnMVGLKOrv3aacGNgJcjcB HQY6H0D4FaIXvbh9W4GTOqMLDziYjqsgvhxyMWQo7AXzB1VsxTQ+Dhgi3VyAY9HWLPYc jT9oQHPzZ9yNKLtOtILEljK7Svw44DH+uXRaXsApl27NrF9e3Ibros2lEFa1K8G4Wkkv ziAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RvNF3X2E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21si32994651otr.58.2020.01.02.14.39.43; Thu, 02 Jan 2020 14:39:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RvNF3X2E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731117AbgABWiw (ORCPT + 99 others); Thu, 2 Jan 2020 17:38:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:53578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731360AbgABWit (ORCPT ); Thu, 2 Jan 2020 17:38:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 8DEB524650; Thu, 2 Jan 2020 22:38:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004729; bh=OtxbCXFjP2oaiM7NLaEynn8akiAk4XtBtfpzFMuzhDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RvNF3X2E/YCdkLQx5fX3nnK7UxYMoiKL6ZqMb/aIe/4GuyDMncDxOQtTkK7Y/qV+o A5C4kyvQo1/C4uKzQGli/H6IZW/N1u7Jpca35T2TQ3t+uvShnLOUIv9XaFfFW3ftUV TAumWf4sLa3RTq2X/Wr5+jVNWnc0kdlcr+wEQLXY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+3031f712c7ad5dd4d926@syzkaller.appspotmail.com, Linus Torvalds , Siddharth Chandrasekaran Subject: [PATCH 4.4 129/137] filldir[64]: remove WARN_ON_ONCE() for bad directory entries Date: Thu, 2 Jan 2020 23:08:22 +0100 Message-Id: <20200102220604.479039672@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Torvalds commit b9959c7a347d6adbb558fba7e36e9fef3cba3b07 upstream. This was always meant to be a temporary thing, just for testing and to see if it actually ever triggered. The only thing that reported it was syzbot doing disk image fuzzing, and then that warning is expected. So let's just remove it before -rc4, because the extra sanity testing should probably go to -stable, but we don't want the warning to do so. Reported-by: syzbot+3031f712c7ad5dd4d926@syzkaller.appspotmail.com Fixes: 8a23eb804ca4 ("Make filldir[64]() verify the directory entry filename is valid") Signed-off-by: Linus Torvalds Signed-off-by: Siddharth Chandrasekaran Signed-off-by: Greg Kroah-Hartman --- fs/readdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/readdir.c +++ b/fs/readdir.c @@ -77,9 +77,9 @@ EXPORT_SYMBOL(iterate_dir); */ static int verify_dirent_name(const char *name, int len) { - if (WARN_ON_ONCE(!len)) + if (!len) return -EIO; - if (WARN_ON_ONCE(memchr(name, '/', len))) + if (memchr(name, '/', len)) return -EIO; return 0; }