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:   Tue, 21 Aug 2018 10:55:05 +0100
From:   David Howells <dhowells@...hat.com>
To:     viro@...iv.linux.org.uk
Cc:     dhowells@...hat.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] vfs: Fix vfs_dup_fs_context()

vfs_dup_fs_context() allocates the wrong type of structure and as a result
ends up with one that's too small.

This isn't a problem at this time as nothing uses vfs_dup_fs_context() yet
(until nfs and btrfs conversions come along).

Fixes: ad3e21240b41 ("vfs: Implement a filesystem superblock creation/configuration context")
Signed-off-by: David Howells <dhowells@...hat.com>
---

 fs/fs_context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs_context.c b/fs/fs_context.c
index a6597a2fbf2b..14921b2c1e42 100644
--- a/fs/fs_context.c
+++ b/fs/fs_context.c
@@ -348,7 +348,7 @@ struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc)
 	if (!src_fc->ops->dup)
 		return ERR_PTR(-EOPNOTSUPP);
 
-	fc = kmemdup(src_fc, sizeof(struct legacy_fs_context), GFP_KERNEL);
+	fc = kmemdup(src_fc, sizeof(struct fs_context), GFP_KERNEL);
 	if (!fc)
 		return ERR_PTR(-ENOMEM);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ