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: <4F1EC5BA020000780006EABF@nat28.tlf.novell.com>
Date:	Tue, 24 Jan 2012 13:52:42 +0000
From:	"Jan Beulich" <JBeulich@...e.com>
To:	<konrad@...nok.org>, "Jeremy Fitzhardinge" <jeremy@...p.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@...cle.com>
Cc:	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] xenbus_dev: add missing error check to watch handling

So far only the watch path was checked to be zero terminated, while
the watch token was merely assumed to be.

Signed-off-by: Jan Beulich <jbeulich@...e.com>

---
 drivers/xen/xenbus/xenbus_dev_frontend.c |    4 ++++
 1 file changed, 4 insertions(+)

--- 3.3-rc1/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ 3.3-rc1-xenbus-dev-write-watch/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -369,6 +369,10 @@ static int xenbus_write_watch(unsigned m
 		goto out;
 	}
 	token++;
+	if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) {
+		rc = -EILSEQ;
+		goto out;
+	}
 
 	if (msg_type == XS_WATCH) {
 		watch = alloc_watch_adapter(path, token);




View attachment "linux-3.3-rc1-xenbus-dev-write-watch.patch" of type "text/plain" (702 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ