public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: alvalan9@foxmail.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1.y] scsi: sg: Fix slab-use-after-free read in sg_release()
Date: Mon, 13 Jan 2025 18:08:56 -0500	[thread overview]
Message-ID: <20250113154914-d677dbd3643494e5@stable.kernel.org> (raw)
In-Reply-To: <tencent_F25BABE1B0C2A434C8D316D5147CD849FE0A@qq.com>

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: f10593ad9bc36921f623361c9e3dd96bd52d85ee

WARNING: Author mismatch between patch and upstream commit:
Backport author: alvalan9@foxmail.com
Commit author: Suraj Sonawane<surajsonawane0215@gmail.com>


Status in newer kernel trees:
6.12.y | Present (different SHA1: 1f5e2f1ca587)
6.6.y | Present (different SHA1: 59b30afa5786)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  f10593ad9bc3 ! 1:  7c77aeeb186d scsi: sg: Fix slab-use-after-free read in sg_release()
    @@ Metadata
      ## Commit message ##
         scsi: sg: Fix slab-use-after-free read in sg_release()
     
    +    commit f10593ad9bc36921f623361c9e3dd96bd52d85ee upstream.
    +
         Fix a use-after-free bug in sg_release(), detected by syzbot with KASAN:
     
         BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30
    @@ Commit message
         Link: https://lore.kernel.org/r/20241120125944.88095-1-surajsonawane0215@gmail.com
         Reviewed-by: Bart Van Assche <bvanassche@acm.org>
         Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    +    Signed-off-by: Alva Lan <alvalan9@foxmail.com>
     
      ## drivers/scsi/sg.c ##
     @@ drivers/scsi/sg.c: sg_release(struct inode *inode, struct file *filp)
    - 	SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, "sg_release\n"));
      
      	mutex_lock(&sdp->open_rel_lock);
    + 	scsi_autopm_put_device(sdp->device);
     -	kref_put(&sfp->f_ref, sg_remove_sfp);
      	sdp->open_cnt--;
      
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

      reply	other threads:[~2025-01-13 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 12:11 [PATCH 6.1.y] scsi: sg: Fix slab-use-after-free read in sg_release() alvalan9
2025-01-13 23:08 ` Sasha Levin [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=20250113154914-d677dbd3643494e5@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=alvalan9@foxmail.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox