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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAEmQOhDAsSKkL2pofEWy_D_02uNG4=NE4hYi20etV7kF5OqfOw@mail.gmail.com>
Date:	Thu, 30 May 2013 11:55:45 +0200
From:	Jonathan Salwan <jonathan.salwan@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] vmwgfx : Fix potential NULL pointer dereference in vmw_surface_define_ioctl()

Hello,

In ./drivers/gpu/drm/vmwgfx/vmwgfx_surface.c line 735 isn't
'srf->sizes' but 'srf->offsets' which need to be checked.


diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 5828143..02da0ee 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -732,7 +732,7 @@ int vmw_surface_define_ioctl(struct drm_device
*dev, void *data,
        }
        srf->offsets = kmalloc(srf->num_sizes * sizeof(*srf->offsets),
                               GFP_KERNEL);
-       if (unlikely(srf->sizes == NULL)) {
+       if (unlikely(srf->offsets == NULL)) {
                ret = -ENOMEM;
                goto out_no_offsets;
        }


Regards,

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