All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: syzbot+c80e9ef5d8bb45894db0@syzkaller.appspotmail.com,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] udmabuf: Set ubuf->sg = NULL if the creation of sg table fails
Date: Thu, 25 Aug 2022 12:00:28 +0200	[thread overview]
Message-ID: <20220825100028.gyuyvy6o4zjvksvh@sirius.home.kraxel.org> (raw)
In-Reply-To: <20220825063522.801264-1-vivek.kasireddy@intel.com>

On Wed, Aug 24, 2022 at 11:35:22PM -0700, Vivek Kasireddy wrote:
> When userspace tries to map the dmabuf and if for some reason
> (e.g. OOM) the creation of the sg table fails, ubuf->sg needs to be
> set to NULL. Otherwise, when the userspace subsequently closes the
> dmabuf fd, we'd try to erroneously free the invalid sg table from
> release_udmabuf resulting in the following crash reported by syzbot:
> 
> general protection fault, probably for non-canonical address
> 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN

[ ... ]

> Reported-by: syzbot+c80e9ef5d8bb45894db0@syzkaller.appspotmail.com
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>

Pushed to drm-misc-next.

thanks,
  Gerd


      reply	other threads:[~2022-08-25 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  0:09 [syzbot] general protection fault in release_udmabuf syzbot
2022-08-25  6:35 ` [PATCH] udmabuf: Set ubuf->sg = NULL if the creation of sg table fails Vivek Kasireddy
2022-08-25 10:00   ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220825100028.gyuyvy6o4zjvksvh@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=syzbot+c80e9ef5d8bb45894db0@syzkaller.appspotmail.com \
    --cc=vivek.kasireddy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.