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]
Message-ID: <3908561D78D1C84285E8C5FCA982C28F03FD68@ORSMSX104.amr.corp.intel.com>
Date:	Tue, 28 Feb 2012 22:43:52 +0000
From:	"Luck, Tony" <tony.luck@...el.com>
To:	Borislav Petkov <bp@...64.org>, Ingo Molnar <mingo@...e.hu>
CC:	EDAC devel <linux-edac@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Borislav Petkov <borislav.petkov@....com>
Subject: RE: [PATCH 2/3] x86, RAS: Add a decoded msg buffer

+	if (left <= 50) {
+		/* enlarge arbitrarily by 50 chars */
+		err_str_sz += 50;
+		left += 50;
+
+		err_str = krealloc(err_str, err_str_sz, GFP_KERNEL);
+		if (!err_str) {
+			pr_err("Error enlarging decode buffer.\n");
+			return;
+		}
+	}

This looks worrying to me.  Some bad stuff has happened, we are perhaps
in machine check context, and you want to start allocating memory!

Is there some upper bound for how long this string can get? Why not
just allocate a generous amount at boot time?

-Tony
--
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