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
| ||
|
Message-Id: <1357861303-25903-3-git-send-email-dtor@vmware.com> Date: Thu, 10 Jan 2013 15:41:40 -0800 From: Dmitry Torokhov <dtor@...are.com> To: Greg KH <gregkh@...uxfoundation.org> Cc: Randy Dunlap <rdunlap@...radead.org>, Stephen Rothwell <sfr@...b.auug.org.au>, linux-kernel@...r.kernel.org, pv-drivers@...are.com Subject: [PATCH 3/6] VMCI: Fix deref before NULL-check of queuepair ptr From: Andy King <acking@...are.com> Check for a valid queuepair ptr before trying to lock the queuepair (which will deref it). Reported-by: Dan Carpenter <dan.carpenter@...cle.com> Signed-off-by: Andy King <acking@...are.com> Signed-off-by: Dmitry Torokhov <dtor@...are.com> --- drivers/misc/vmw_vmci/vmci_queue_pair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c index da47e45..6417a26 100644 --- a/drivers/misc/vmw_vmci/vmci_queue_pair.c +++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c @@ -3355,11 +3355,11 @@ ssize_t vmci_qpair_dequev(struct vmci_qp *qpair, { ssize_t result; - qp_lock(qpair); - if (!qpair || !iov) return VMCI_ERROR_INVALID_ARGS; + qp_lock(qpair); + do { result = qp_dequeue_locked(qpair->produce_q, qpair->consume_q, -- 1.7.4.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