Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp70439imu; Mon, 10 Dec 2018 16:20:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uh6rhRe15d3U0+8QFo4sPllXHyYtw6/NuuEq0F3bYnDVusy+LOMPDLo7HA0qbKOm21IHlD X-Received: by 2002:a62:1bd7:: with SMTP id b206mr14233895pfb.213.1544487640483; Mon, 10 Dec 2018 16:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544487640; cv=none; d=google.com; s=arc-20160816; b=NkM6FxoueAnq77EQOhE9r9g2X+Jzutp+F5J/T9/shoQocnW//FXIWSmcYgo7Qyklyo Kr+vAMJBOOANZeneG/6bMOSRl55/P85IVL+v97il7oEcbZNG7SrvyRfhlqbxWndBXO+r 3cTaHPuULhL04pzQNE6fgPzzmVFRgg9tVFs5uoiwZCo8G0G6un6VLwpg9YQfoyTa9cr7 3+z74BpdLltXPIvHxnkqv56X7P09uiyNawxqFf6HcXPl7fMb5ZgEkcLhtUTnF3UqToDr xbNjIqftKDYuZbiCN3qXGnv5caHI+5sZkISEGsxQvSUaiYg9jtAzmh0i7FNbxA2Aopfz 2wxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date:dkim-signature; bh=SW+JYMnm1gy4OkTv1/cggq5g1jwYUhqSg+/N6TRlEoU=; b=WxNc19CHlQoLU7qWgzrlgahiNCJnu9bbeMdDqJQqMGg97xYgqbff7hUKraHuMPml3M u0VOWbINh4TbPGgzIwZlWywxAzdBTW2V5kTVj8zDb2vIiWBxCKYCuouqKNwf1Rxil7Wl 3wKPz/mB2Ty5wvMIFqrJ7K8sQuMJmVLZdwR0zlfNYStUEQORHtjITH/H+0yXV+sIZEOV 7/Kp0u7SBH9rEnCW8s6Ep21Xx83qsqc7L0t7ozjgUNkj8sPHGVn9FWXplMLSqbz/Tull MMA1DhIX8wQDM4B3hKA1HGwx7dQyvUJcIlemEToJEdAcAhqDSxUZ6B3VFkrkhYB1o+cP HqWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=h+RKq05+; 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 a90si11297295plc.314.2018.12.10.16.20.25; Mon, 10 Dec 2018 16:20:40 -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=@canb.auug.org.au header.s=201702 header.b=h+RKq05+; 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 S1730053AbeLJXNZ (ORCPT + 99 others); Mon, 10 Dec 2018 18:13:25 -0500 Received: from ozlabs.org ([203.11.71.1]:40235 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbeLJXNZ (ORCPT ); Mon, 10 Dec 2018 18:13:25 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43DJlk3Yt6z9s4s; Tue, 11 Dec 2018 10:13:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1544483602; bh=HFQ+rMfvFmZjZzpMfZy+HVrnkQF3H3JXVDFgdR87BZg=; h=Date:From:To:Cc:Subject:From; b=h+RKq05+AZis9qW1pld4cCXW25Dy3TD5AtABgUH1M0A87oKjOwntesZEqi/Mg1QxX T05JHJbRxlIqepDDUo4qjqgG93E5jovYjQrYp4niuWZtigt5mbQyQ8xx8Xvm3bOWKr EU75p2Pw/kzrn4B070Wc+SwtJZBDjzUMy2Hl8PlUmRnYVPEq+CR4Wjls1zGa8RpFST NR3J3rc+4Z+lKXO/4gDMM2gEizT/TQggMUyAtZ+Kv60AFH6ul3dUT0jww3AsadUgas 0D32y0M+SwFs2oP4iebWuc9h//PTsb8bK/jVaaO85IxbI+vZ4jgHS7MnPXb34O7CRL GuKQG3D5Y5Z/w== Date: Tue, 11 Dec 2018 10:13:22 +1100 From: Stephen Rothwell To: Jaegeuk Kim , Theodore Ts'o Cc: Linux Next Mailing List , Linux Kernel Mailing List , Chandan Rajendra Subject: linux-next: manual merge of the f2fs tree with the fscrypt tree Message-ID: <20181211101322.438946fe@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/mzvSQGkDD/xe951vhGipX7/"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/mzvSQGkDD/xe951vhGipX7/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the f2fs tree got a conflict in: fs/f2fs/dir.c between commit: 848a010287e6 ("f2fs: use IS_ENCRYPTED() to check encryption status") from the fscrypt tree and commit: 4e240d1bab1e ("f2fs: check memory boundary by insane namelen") from the f2fs tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc fs/f2fs/dir.c index cf9e2564388d,c0c845da12fa..000000000000 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@@ -808,7 -808,18 +808,18 @@@ int f2fs_fill_dentries(struct dir_conte de_name.name =3D d->filename[bit_pos]; de_name.len =3D le16_to_cpu(de->name_len); =20 + /* check memory boundary before moving forward */ + bit_pos +=3D GET_DENTRY_SLOTS(le16_to_cpu(de->name_len)); + if (unlikely(bit_pos > d->max)) { + f2fs_msg(sbi->sb, KERN_WARNING, + "%s: corrupted namelen=3D%d, run fsck to fix.", + __func__, le16_to_cpu(de->name_len)); + set_sbi_flag(sbi, SBI_NEED_FSCK); + err =3D -EINVAL; + goto out; + } +=20 - if (f2fs_encrypted_inode(d->inode)) { + if (IS_ENCRYPTED(d->inode)) { int save_len =3D fstr->len; =20 err =3D fscrypt_fname_disk_to_usr(d->inode, --Sig_/mzvSQGkDD/xe951vhGipX7/ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlwO8xIACgkQAVBC80lX 0Gy9JggAm9oZZAeRq13RI5i6WlpVoydGB0NRXvHe+d/ThDkZhonr0FoQBKgYM20U LXdp6oryxnL5XxREFtEaJR3HwBNLnDZtaGLFmmaQrnbwz3vh0CCqgh6F1xWRW3lP FaDUMUUK7MKlyzKDXvjPmIzT8euCbRtDvvOZpGw7nWCBFBhLQZaFKezehGTifBAk Vr0vJpRflY1WIKHzBAp4zybC2oHx6jf4t02kYBSSMXkZ9iOLye8xrVOgShcKf1uq X3iCRiNGdpLx/xri9dw/GvShfyP4UdTm9cvQ8Fb8PSNXeQO6hvQKZi7vsiHRj3/U OZu0lid6qy4UfKLIfDyiAIbjp48ItA== =s6Vc -----END PGP SIGNATURE----- --Sig_/mzvSQGkDD/xe951vhGipX7/--