[CRIU] [crtools-bot for Kir Kolyshkin ] show_unixsk(): avoid buffer
overflow
Cyrill Gorcunov
gorcunov at openvz.org
Sat Feb 11 02:58:23 EST 2012
The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 41fb6b3f6bb9c5cd06de7eb7d9fee24a9e50e004
Author: Kir Kolyshkin <kir at openvz.org>
Date: Sat Feb 11 03:30:09 2012 +0400
show_unixsk(): avoid buffer overflow
Say in case of corrupted img file
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
sockets.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sockets.c b/sockets.c
index 47ead71..ab997a2 100644
--- a/sockets.c
+++ b/sockets.c
@@ -1175,6 +1175,7 @@ void show_unixsk(int fd)
ue.id, ue.peer);
if (ue.namelen) {
+ BUG_ON(ue.namelen > sizeof(buf));
ret = read_img_buf(fd, buf, ue.namelen);
if (ret < 0) {
pr_info("\n");
More information about the CRIU
mailing list