All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Hillf Danton <hdanton@sina.com>
Cc: toke@toke.dk, linux-kernel@vger.kernel.org,
	syzbot+c6dde1f690b60e0b9fbe@syzkaller.appspotmail.com
Subject: Re: [PATCH v5 1/2] ath9k: fix use-after-free in ath9k_hif_usb_rx_cb
Date: Fri, 10 Jun 2022 16:01:06 +0300	[thread overview]
Message-ID: <2ee8f6fc-aec1-39a6-e8db-56e5e449ee8e@gmail.com> (raw)
In-Reply-To: <20220522041542.2911-1-hdanton@sina.com>


[-- Attachment #1.1: Type: text/plain, Size: 1084 bytes --]

Hi Hillf,

On 5/22/22 07:15, Hillf Danton wrote:
> 
> In the call chain below
> 
> 	ath9k_hif_usb_firmware_cb()
> 	  ath9k_htc_hw_alloc()
> 	  ath9k_hif_usb_dev_init()
> 	  ret = ath9k_htc_hw_init()
> 	          ath9k_htc_probe_device()
> 		    htc_handle->drv_priv = priv;
> 		    ret = ath9k_htc_wait_for_target(priv);
> 		    if (ret)
> 			goto err_free;
> 	  if (ret)
> 		goto err_htc_hw_init;
> 
> err_free:
> 	ieee80211_free_hw(hw);
> 
> 
> err_htc_hw_init:
> 	ath9k_hif_usb_dev_deinit(hif_dev);
> 	  ath9k_hif_usb_dealloc_urbs()
> err_dev_init:
> 	ath9k_htc_hw_free(hif_dev->htc_handle);
> err_dev_alloc:
> 	release_firmware(fw);
> err_fw:
> 	ath9k_hif_usb_firmware_fail(hif_dev);
> 
> 
> hw should survive deallocating urbs, and changes should be added instead to
> the rollback in ath9k_htc_probe_device() by deferring cleanup of hw to its
> callsite in addition to urbs.
> 

Don't get it, sorry. I am not changing the life time of `hw`, I am just 
deferring htc_handle->drv_priv initialization.




With regards,
Pavel Skripkin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

       reply	other threads:[~2022-06-10 13:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220522041542.2911-1-hdanton@sina.com>
2022-06-10 13:01 ` Pavel Skripkin [this message]
2022-06-10 18:30   ` [PATCH v5 1/2] ath9k: fix use-after-free in ath9k_hif_usb_rx_cb Toke Høiland-Jørgensen
2022-05-21 21:28 Pavel Skripkin
2022-06-10 12:49 ` Takashi Iwai
2022-06-10 18:30   ` Toke Høiland-Jørgensen
2022-06-10 18:34     ` Pavel Skripkin
2022-06-10 21:02       ` Toke Høiland-Jørgensen

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=2ee8f6fc-aec1-39a6-e8db-56e5e449ee8e@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+c6dde1f690b60e0b9fbe@syzkaller.appspotmail.com \
    --cc=toke@toke.dk \
    /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.