qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 008377: eepro100: Prevent two endless loops


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 008377: eepro100: Prevent two endless loops
Date: Fri, 27 Nov 2015 04:00:07 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 00837731d254908a841d69298a4f9f077babaf24
      
https://github.com/qemu/qemu/commit/00837731d254908a841d69298a4f9f077babaf24
  Author: Stefan Weil <address@hidden>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M hw/net/eepro100.c

  Log Message:
  -----------
  eepro100: Prevent two endless loops

http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg04592.html
shows an example how an endless loop in function action_command can
be achieved.

During my code review, I noticed a 2nd case which can result in an
endless loop.

Reported-by: Qinghao Tang <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Jason Wang <address@hidden>


  Commit: ee0428e3acd237e4d555cc54134cea473cab5ee7
      
https://github.com/qemu/qemu/commit/ee0428e3acd237e4d555cc54134cea473cab5ee7
  Author: Andrew Baumann <address@hidden>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M net/tap-win32.c

  Log Message:
  -----------
  tap-win32: skip unexpected nodes during registry enumeration

In order to find a named tap device, get_device_guid() enumerates children of
HKLM\SYSTEM\CCS\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}
(aka NETWORK_CONNECTIONS_KEY). For each child, it then looks for a
"Connection" subkey, but if this key doesn't exist, it aborts the
entire search. This was observed to fail on at least one Windows 10
machine, where there is an additional child of NETWORK_CONNECTIONS_KEY
(named "Descriptions"). Since registry enumeration doesn't guarantee
any particular sort order, we should continue to search for matching
children rather than aborting the search.

Signed-off-by: Andrew Baumann <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Signed-off-by: Jason Wang <address@hidden>


  Commit: b73c1849148da1229a3c3b336311a8194970b35f
      
https://github.com/qemu/qemu/commit/b73c1849148da1229a3c3b336311a8194970b35f
  Author: Andrew Baumann <address@hidden>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M net/tap-win32.c

  Log Message:
  -----------
  tap-win32: disable broken async write path

The code under the TUN_ASYNCHRONOUS_WRITES path makes two incorrect
assumptions about the behaviour of the WriteFile API for overlapped
file handles. First, WriteFile does not update the
lpNumberOfBytesWritten parameter when the write completes
asynchronously (the number of bytes written is known only when the
operation completes). Second, the buffer shouldn't be touched (or
freed) until the operation completes. This led to at least one bug
where tap_win32_write returned zero bytes written, which in turn
caused further writes ("receives") to be disabled for that device.

This change disables the asynchronous write path, while keeping most
of the code around in case someone sees value in resurrecting it. It
also adds some conditional debug output, similar to the read path.

Signed-off-by: Andrew Baumann <address@hidden>
Acked-by: Stefan Weil <address@hidden>
Signed-off-by: Jason Wang <address@hidden>


  Commit: 714487515dbe0c65d5904251e796cd3a5b3579fb
      
https://github.com/qemu/qemu/commit/714487515dbe0c65d5904251e796cd3a5b3579fb
  Author: Peter Maydell <address@hidden>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M hw/net/eepro100.c
    M net/tap-win32.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into 
staging

# gpg: Signature made Fri 27 Nov 2015 02:42:02 GMT using RSA key ID 398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  tap-win32: disable broken async write path
  tap-win32: skip unexpected nodes during registry enumeration
  eepro100: Prevent two endless loops

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/b04fc428356a...714487515dbe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]