Thread (16 messages) 16 messages, 3 authors, 2020-12-06

Re: [PATCH 3/6] Drivers: hv: vmbus: Avoid double fetch of payload_size in vmbus_on_msg_dpc()

From: Andrea Parri <parri.andrea@gmail.com>
Date: 2020-12-06 18:21:39
Also in: lkml

On Sun, Dec 06, 2020 at 05:14:18PM +0000, Michael Kelley wrote:
From: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Sent: Wednesday, November 18, 2020 6:37 AM
quoted
vmbus_on_msg_dpc() double fetches from payload_size.  The double fetch
can lead to a buffer overflow when (mem)copying the hv_message object.
Avoid the double fetch by saving the value of payload_size into a local
variable.
Similar comment here about providing some brief context in the commit
message on the problem that we are guarding against by removing the
double fetch.
Will expand.

I could see combining this patch with the previous one since the
motivation and pattern of the changes are exactly the same, just for
two different fields.
Will consider this suggestion for v3.  Please see v2 for a related
discussion.

  Andrea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help