[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 17:52:28 +0100
From: vegard.nossum@...cle.com
To: linux-kernel@...r.kernel.org
Cc: Vegard Nossum <vegard.nossum@...cle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 5/9] hfsplus: Known exploit detection for CVE-2012-2319
From: Vegard Nossum <vegard.nossum@...cle.com>
See 6f24f892871acc47b40dd594c63606a17c714f77.
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
fs/hfsplus/catalog.c | 2 ++
fs/hfsplus/dir.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
index 968ce41..5f47a1a 100644
--- a/fs/hfsplus/catalog.c
+++ b/fs/hfsplus/catalog.c
@@ -8,6 +8,7 @@
* Handling of catalog records
*/
+#include <linux/exploit.h>
#include "hfsplus_fs.h"
#include "hfsplus_raw.h"
@@ -374,6 +375,7 @@ int hfsplus_rename_cat(u32 cnid,
if (err)
goto out;
if (src_fd.entrylength > sizeof(entry) || src_fd.entrylength < 0) {
+ exploit("CVE-2012-2319");
err = -EIO;
goto out;
}
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
index 4a4fea0..2d5e283 100644
--- a/fs/hfsplus/dir.c
+++ b/fs/hfsplus/dir.c
@@ -9,6 +9,7 @@
*/
#include <linux/errno.h>
+#include <linux/exploit.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/random.h>
@@ -152,6 +153,7 @@ static int hfsplus_readdir(struct file *file, struct dir_context *ctx)
}
if (ctx->pos == 1) {
if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
+ exploit("CVE-2012-2319");
err = -EIO;
goto out;
}
@@ -186,6 +188,7 @@ static int hfsplus_readdir(struct file *file, struct dir_context *ctx)
}
if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
+ exploit("CVE-2012-2319");
err = -EIO;
goto out;
}
--
1.7.10.4
--
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