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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190121122505.295469164@linuxfoundation.org>
Date:   Mon, 21 Jan 2019 14:43:16 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org,
        syzbot+eb6e5365f23c02517dda@...kaller.appspotmail.com,
        Daniel Vetter <daniel.vetter@...el.com>,
        Haneen Mohammed <hamohammed.sa@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Rodrigo Siqueira <rodrigosiqueiramelo@...il.com>,
        Gustavo Padovan <gustavo.padovan@...labora.com>,
        Eric Anholt <eric@...olt.net>
Subject: [PATCH 4.20 082/111] drm/vkms: Fix plane duplicate_state

4.20-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniel Vetter <daniel.vetter@...ll.ch>

commit 7cdf33ab02e01300e7e6289acbac9cd8759f8712 upstream.

We need to handle allocation failures and bail out. While at it, tune
the allocation failures down to debug level.

syzbot injected an allocation failure and then hit this WARN_ON.

Reported-by: syzbot+eb6e5365f23c02517dda@...kaller.appspotmail.com
Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
Cc: Haneen Mohammed <hamohammed.sa@...il.com>
Cc: Sean Paul <seanpaul@...omium.org>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@...il.com>
Cc: Gustavo Padovan <gustavo.padovan@...labora.com>
Reviewed-by: Eric Anholt <eric@...olt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181128101033.4840-1-daniel.vetter@ffwll.ch
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
 drivers/gpu/drm/vkms/vkms_plane.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -23,8 +23,11 @@ vkms_plane_duplicate_state(struct drm_pl
 		return NULL;
 
 	crc_data = kzalloc(sizeof(*crc_data), GFP_KERNEL);
-	if (WARN_ON(!crc_data))
-		DRM_INFO("Couldn't allocate crc_data");
+	if (!crc_data) {
+		DRM_DEBUG_KMS("Couldn't allocate crc_data\n");
+		kfree(vkms_state);
+		return NULL;
+	}
 
 	vkms_state->crc_data = crc_data;
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ