From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 39C37C433DF for ; Tue, 23 Jun 2020 05:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BE2E20738 for ; Tue, 23 Jun 2020 05:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592889913; bh=+cGGEiWaJta3usBdSXNV9QssDQuoy76Fch1p12PnQT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=RKdw/5ARLnPaLyAVnIlNiLuRjPTcCwbj0lhKW+/Gj+QOH26lzwEAQnzguE5h8QktE Sx/VzEGTtBT3I17QQL1r9hjgvQOIObw/FfEm+0mQpVanaMXBMWOMZTT1MMDFRCr+ad uzGU0C+Ezt+47b0QfZ7BKEB2jOikBmdTUYE10tw4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728615AbgFWFZM (ORCPT ); Tue, 23 Jun 2020 01:25:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:52086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728496AbgFWFZM (ORCPT ); Tue, 23 Jun 2020 01:25:12 -0400 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 5932F20716; Tue, 23 Jun 2020 05:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592889911; bh=+cGGEiWaJta3usBdSXNV9QssDQuoy76Fch1p12PnQT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mpgVra/zzsnVgaIiKqR0COs1FKOKp495k5Zov5S5XxdM7n83c8SSkwfXSz4UqIIYB qx6rge18fe0zef5gaxdX/dZHkAh5CO9Zz9Z4xmQlzlA7MNl9cksqWNk1+neaWRyLhi dD3xofB1Jp2DE0pEkHmLejqs/PQRrMFScY01zAzM= Date: Tue, 23 Jun 2020 07:25:05 +0200 From: Greg KH To: Sasha Levin Cc: ebiggers@google.com, drosen@google.com, jaegeuk@kernel.org, krisman@collabora.co.uk, stable@vger.kernel.org, viro@zeniv.linux.org.uk, yuchao0@huawei.com Subject: Re: FAILED: patch "[PATCH] f2fs: avoid utf8_strncasecmp() with unstable name" failed to apply to 5.7-stable tree Message-ID: <20200623052505.GA2353897@kroah.com> References: <1592575583131183@kroah.com> <20200623012948.GU1931@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623012948.GU1931@sasha-vm> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Jun 22, 2020 at 09:29:48PM -0400, Sasha Levin wrote: > On Fri, Jun 19, 2020 at 04:06:23PM +0200, gregkh@linuxfoundation.org wrote: > > > > The patch below does not apply to the 5.7-stable tree. > > If someone wants it applied there, or to any other stable or longterm > > tree, then please email the backport, including the original git commit > > id to . > > > > thanks, > > > > greg k-h > > > > ------------------ original commit in Linus's tree ------------------ > > > > > From fc3bb095ab02b9e7d89a069ade2cead15c64c504 Mon Sep 17 00:00:00 2001 > > From: Eric Biggers > > Date: Mon, 1 Jun 2020 13:08:05 -0700 > > Subject: [PATCH] f2fs: avoid utf8_strncasecmp() with unstable name > > > > If the dentry name passed to ->d_compare() fits in dentry::d_iname, then > > it may be concurrently modified by a rename. This can cause undefined > > behavior (possibly out-of-bounds memory accesses or crashes) in > > utf8_strncasecmp(), since fs/unicode/ isn't written to handle strings > > that may be concurrently modified. > > > > Fix this by first copying the filename to a stack buffer if needed. > > This way we get a stable snapshot of the filename. > > > > Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") > > Cc: # v5.4+ > > Cc: Al Viro > > Cc: Daniel Rosenberg > > Cc: Gabriel Krisman Bertazi > > Signed-off-by: Eric Biggers > > Reviewed-by: Chao Yu > > Signed-off-by: Jaegeuk Kim > > I've grabbed f874fa1c7c79 ("f2fs: split f2fs_d_compare() from > f2fs_match_name()") as a dependency and queued both for 5.7 and 5.4. Thanks for this fix, and the other fixes for the FAILED patches you have queued up. greg k-h