[PATCH v1 0/1] virtio-snd: fix invalid tx/rx message handling logic

Manos Pitsidianakis posted 1 patch 1 month ago
Failed in applying to current master (apply log)
include/hw/audio/virtio-snd.h |  16 +++-
hw/audio/virtio-snd.c         | 137 +++++++++++++++-------------------
2 files changed, 77 insertions(+), 76 deletions(-)
[PATCH v1 0/1] virtio-snd: fix invalid tx/rx message handling logic
Posted by Manos Pitsidianakis 1 month ago
This is a logic fix for the error handling in the TX/RX virt queue 
handlers. A potential invalid address dereference was reported and fixed 
by Zheyu Ma in <20240322110827.568412-1-zheyuma97@gmail.com>. This patch 
moves the invalid message storage from the stream structs to the virtio 
device struct to

1. make such bug impossible
2. reply to invalid messages again with VIRTIO_SND_S_BAD_MSG, which was 
not possible before.

Patch based on master base-commit: 853546f8128476eefb701d4a55b2781bb3a46faa
with the following patch applied:

  Subject: [PATCH v2] virtio-snd: Enhance error handling for invalid
   transfers
  From: Zheyu Ma <zheyuma97@gmail.com>
  Date: Fri, 22 Mar 2024 12:08:27 +0100
  Message-Id: <20240322110827.568412-1-zheyuma97@gmail.com>


Manos Pitsidianakis (1):
  virtio-snd: rewrite invalid tx/rx message handling

 include/hw/audio/virtio-snd.h |  16 +++-
 hw/audio/virtio-snd.c         | 137 +++++++++++++++-------------------
 2 files changed, 77 insertions(+), 76 deletions(-)


base-commit: 853546f8128476eefb701d4a55b2781bb3a46faa
prerequisite-patch-id: 8209301569bd30ba806d06b3452a2f3156503a7a
-- 
γαῖα πυρί μιχθήτω


Re: [PATCH v1 0/1] virtio-snd: fix invalid tx/rx message handling logic
Posted by Manos Pitsidianakis 3 weeks, 1 day ago
ping

On Sun, 24 Mar 2024 12:04, Manos Pitsidianakis <manos.pitsidianakis@linaro.org> wrote:
>This is a logic fix for the error handling in the TX/RX virt queue 
>handlers. A potential invalid address dereference was reported and fixed 
>by Zheyu Ma in <20240322110827.568412-1-zheyuma97@gmail.com>. This patch 
>moves the invalid message storage from the stream structs to the virtio 
>device struct to
>
>1. make such bug impossible
>2. reply to invalid messages again with VIRTIO_SND_S_BAD_MSG, which was 
>not possible before.
>
>Patch based on master base-commit: 853546f8128476eefb701d4a55b2781bb3a46faa
>with the following patch applied:
>
>  Subject: [PATCH v2] virtio-snd: Enhance error handling for invalid
>   transfers
>  From: Zheyu Ma <zheyuma97@gmail.com>
>  Date: Fri, 22 Mar 2024 12:08:27 +0100
>  Message-Id: <20240322110827.568412-1-zheyuma97@gmail.com>
>
>
>Manos Pitsidianakis (1):
>  virtio-snd: rewrite invalid tx/rx message handling
>
> include/hw/audio/virtio-snd.h |  16 +++-
> hw/audio/virtio-snd.c         | 137 +++++++++++++++-------------------
> 2 files changed, 77 insertions(+), 76 deletions(-)
>
>
>base-commit: 853546f8128476eefb701d4a55b2781bb3a46faa
>prerequisite-patch-id: 8209301569bd30ba806d06b3452a2f3156503a7a
>-- 
>γαῖα πυρί μιχθήτω
>

Re: [PATCH v1 0/1] virtio-snd: fix invalid tx/rx message handling logic
Posted by Michael S. Tsirkin 3 weeks, 1 day ago
On Fri, Apr 05, 2024 at 01:54:46PM +0300, Manos Pitsidianakis wrote:
> ping

confused at this point.
Do you mind sending a patchset with everything in the correct order?
Tag it PATCH repost so people know nothing changed.
Thanks!

-- 
MST
Re: [PATCH v1 0/1] virtio-snd: fix invalid tx/rx message handling logic
Posted by Manos Pitsidianakis 3 weeks ago
On Fri, 5 Apr 2024 at 14:07, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Fri, Apr 05, 2024 at 01:54:46PM +0300, Manos Pitsidianakis wrote:
> > ping
>
> confused at this point.
> Do you mind sending a patchset with everything in the correct order?
> Tag it PATCH repost so people know nothing changed.
> Thanks!


Might not have access to my desktop for a while, so until then let me
know if a resend is still necessary.

The patches are two, in this order:

1. <20240322110827.568412-1-zheyuma97@gmail.com>
2. <virtio-snd-rewrite-invalid-tx-rx-message-handling-v1.manos.pitsidianakis@linaro.org>

Thanks,

-- 
Manos Pitsidianakis
Emulation and Virtualization Engineer at Linaro Ltd