Re: [PATCH 5/9] hfsplus: Known exploit detection for CVE-2012-2319

Greg Kroah-Hartman
2013-12-13T01:38:22Z

On Thu, Dec 12, 2013 at 05:52:28PM +0100, vegard.nossum@oracle.com wrote:
> From: Vegard Nossum <vegard.nossum@oracle.com>
>
> See 6f24f892871acc47b40dd594c63606a17c714f77.

Please put the "name" of the git commit after it, to make it easier to
determine what this is referring to.

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.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");

So, any invalid data here means this was an expoit attempt? No, not
true, corrupted filesystems could also cause this, right?

Same for the other instances here.

greg k-h