lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2016 21:40:49 -0700
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Theodore Ts'o <tytso@....edu>
Cc:     Eric Biggers <ebiggers@...gle.com>, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH] fscrypto: require write access to mount to set
 encryption policy

On Sat, Sep 10, 2016 at 12:15:19AM -0400, Theodore Ts'o wrote:
> On Thu, Sep 08, 2016 at 02:20:38PM -0700, Eric Biggers wrote:
> > [To apply cleanly, my other two patches must be applied before this one]
> > 
> > Since setting an encryption policy requires writing metadata to the
> > filesystem, it should be guarded by mnt_want_write/mnt_drop_write.
> > Otherwise, a user could cause a write to a frozen or readonly
> > filesystem.  This was handled correctly by f2fs but not by ext4.  Make
> > fscrypt_process_policy() handle it rather than relying on the filesystem
> > to get it right.
> > 
> > Signed-off-by: Eric Biggers <ebiggers@...gle.com>

Acked-by: Jaegeuk Kim <jaegeuk@...nel.org>

> > Cc: stable@...r.kernel.org # 4.1+; check fs/{ext4,f2fs}
> 
> Thanks, I have this in the ext4.git's fixes branch, but I plan to only
> send the other two fixes to Linus, since (a) they are more critical,
> and I'd prefer to get an Acked-by from Jaeguk or Changman (as the f2fs
> maintainers) before I send this fix to Linus, since it touches f2fs.

Thank you, Ted.

It'd be better to fix the below basic warnings tho.

# ./scripts/checkpatch.pl [patch]

WARNING: line over 80 characters
#147: FILE: fs/crypto/policy.c:120:
+			ret = create_encryption_context_from_policy(inode, policy);

WARNING: line over 80 characters
#148: FILE: fs/crypto/policy.c:121:
+	} else if (!is_encryption_context_consistent_with_policy(inode, policy)) {

	WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
#149: FILE: fs/crypto/policy.c:122:
+		printk(KERN_WARNING

total: 0 errors, 3 warnings, 107 lines checked

Thanks,



> 
> 							- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists