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>] [day] [month] [year] [list]
Message-Id: <1426956384-22742-1-git-send-email-sanidhya.gatech@gmail.com>
Date:	Sat, 21 Mar 2015 12:46:24 -0400
From:	Sanidhya Kashyap <sanidhya.gatech@...il.com>
To:	akpm@...ux-foundation.org, fabf@...net.be,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	taesoo@...ech.edu, changwoo@...ech.edu, sanidhya@...ech.edu,
	blee@...ech.edu, csong84@...ech.edu,
	Sanidhya Kashyap <sanidhya.gatech@...il.com>
Subject: [PATCH] affs: kstrdup() memory handling

There is a possibility of kstrdup() failure upon memory pressure.
Therefore, returning ENOMEM even for new_opts.

Signed-off-by: Sanidhya Kashyap <sanidhya.gatech@...il.com>
---
 fs/affs/super.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index 4cf0e91..f4d0d36 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -524,6 +524,10 @@ affs_remount(struct super_block *sb, int *flags, char *data)
 	char			 volume[32];
 	char			*prefix = NULL;
 
+
+	if (!new_opts)
+		return -ENOMEM;
+
 	pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
 
 	sync_filesystem(sb);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ