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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 11 Apr 2014 18:40:05 +0200
From:	Johannes Thumshirn <johannes.thumshirn@....de>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	<linux-kernel@...r.kernel.org>,
	Johannes Thumshirn <Johannes.Thumshirn@....de>,
	Christoph Jaeger <christophjaeger@...ux.com>,
	Johannes Thumshirn <johannes.thumshirn@....de>
Subject: [PATCH] drivers: mcb: fix memory leak in chameleon_parse_cells() error path

From: Christoph Jaeger <christophjaeger@...ux.com>

chameleon_parse_cells() bails out if chameleon descriptor type is
invalid but does not free the storage 'header' points to.

Signed-off-by: Christoph Jaeger <christophjaeger@...ux.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....de>
---
 drivers/mcb/mcb-parse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c
index d1278b5..0049269 100644
--- a/drivers/mcb/mcb-parse.c
+++ b/drivers/mcb/mcb-parse.c
@@ -141,6 +141,7 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
 		default:
 			pr_err("Invalid chameleon descriptor type 0x%x\n",
 				dtype);
+			kfree(header);
 			return -EINVAL;
 		}
 		num_cells++;
-- 
1.9.1

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