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]
Message-Id: <1283603071-13471-1-git-send-email-jslaby@suse.cz>
Date:	Sat,  4 Sep 2010 14:24:31 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	mchehab@...hat.com
Cc:	linux-kernel@...r.kernel.org, jirislaby@...il.com,
	Maxim Levitsky <maximlevitsky@...il.com>
Subject: [PATCH 1/1] MEDIA: ere_ir, fix NULL dereference

When 'dev' allocation fails in ene_probe we jump to error label where
we dereference the 'dev'. Fix it by jumping few lines below.

Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Cc: Maxim Levitsky <maximlevitsky@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...hat.com>
---
 drivers/media/IR/ene_ir.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/IR/ene_ir.c b/drivers/media/IR/ene_ir.c
index 5447750..b475030 100644
--- a/drivers/media/IR/ene_ir.c
+++ b/drivers/media/IR/ene_ir.c
@@ -785,7 +785,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
 	dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
 
 	if (!input_dev || !ir_props || !dev)
-		goto error;
+		goto error1;
 
 	/* validate resources */
 	error = -ENODEV;
@@ -899,7 +899,7 @@ error:
 		free_irq(dev->irq, dev);
 	if (dev->hw_io)
 		release_region(dev->hw_io, ENE_MAX_IO);
-
+error1:
 	input_free_device(input_dev);
 	kfree(ir_props);
 	kfree(dev);
-- 
1.7.2.2


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