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

[PATCH 4/6] Under conditions of high load and low resources, it was possible for NDIS (in combination with overlying drivers) to send NET_BUFFER_LIST structures containing NULL MDL's for transmission. This resulted in an immediate bugcheck.


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <Martin.Harvey@xxxxxxxxxx>
  • Date: Tue, 20 Jul 2021 14:29:49 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Martin Harvey <Martin.Harvey@xxxxxxxxxx>, Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Delivery-date: Tue, 20 Jul 2021 13:30:23 +0000
  • Ironport-hdrordr: A9a23:QAf6jqBzJ0FX70jlHejVsseALOsnbusQ8zAXPh9KJyC9I/b2qy nxppgmPEfP+UwssQIb6K290ci7MD/hHPtOi7X5Uo3SOjUO1FHYT72KqLGSuAEIeBeOudK1t5 0QCpSWYeeYZTMW7KbHCUuDYq4dKbK8gcWVbJLlvhBQpHZRGsVdBmlCe2SmO3wzYDMDKYsyFZ Ka6MYCjSGnY24rYsOyAWRAd/TfpvXQ/aiWICIuNloC0k2jnDmo4Ln1H1yzxREFSQ5Cxr8k7C zsjxH53KO+qPu2oyWsl1M7rq4m2+cJ+OEzQfBkufJlbgkETTzYI7iJbofy/gzdZtvfrmrC3u O8+ivIdP4Dl085NlvF3icFnTOQngoG2jva0lmfjmLkocvlABwHK+cpv/MDTjLpr3M6utdyya RK2H/ckaF2I1fvoATRjuK4Dy2DsCKP0CcfeCoo/iZiuMIlGcFshJ1a80VPHJgaGiXmrIghDe l1FcnZoO1baFWAchnizyFSKfGXLwIO9y29MwE/Uw2uokprtWE8y1FdyN0Un38G+p54Q55Y5/ 7cOqAtkL1VVMcZYa90Ge9EGKKMeybwaAOJNHjXLUXsFakBNX6Io5nr4K8t7OXvfJAT1pM9lJ nITVsdv28vfEDlD9GIwfRwg1vwaXT4WS6oxtBV5pB/tLG5TL33MTebQFRriMekq+V3OLytZx 9yAuMjPxbHFxqiJW9k5XyPZ3BiEwhqbCROgKdLZ7unmLO5FrHX
  • Ironport-sdr: QDE78McfnyDYOyicMA+36fhg5w1Ui6nxX33fung57zdB4/GRNjPeFkZD+TF91wbmp8aRY7Aa/R H2VjAx1Q6DVxXPWab1b9sxtV39twa8rJ9OaAUPCl+1T5+k6mWDJ6fxf8jYIH9pgH5J54A5mKWJ LVWWuMZa3y4cVdjhmLYjVnXYeDQT2a8D9JLGXjhyB0I2FP6e3B69MN2CESzRS711mjv8FxbAAr L6Kp/cs4idYAbM51xabDqmyQ+FfDwRYFOqVYqsDqtS7udLThhAMJOSMQjx8GLGgt8VcobMENoK 5gnBULwPevSVdZvw0EpjauOO
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

This patch contains the immediate proximate fix for this particular
issue, instead failing the send with STATUS_INVALID_PARAMETER.

Signed-off-by: Martin Harvey <martin.harvey@xxxxxxxxxx>
---
 src/xenvif/transmitter.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 724615d..ea1282c 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -5148,13 +5148,17 @@ TransmitterQueuePacket(
     PXENVIF_TRANSMITTER_RING        Ring;
     NTSTATUS                        status;
 
+    status = STATUS_INVALID_PARAMETER;
+    if (Mdl == NULL)
+        goto fail1;
+
     Frontend = Transmitter->Frontend;
 
     Packet = __TransmitterGetPacket(Transmitter);
 
     status = STATUS_NO_MEMORY;
     if (Packet == NULL)
-        goto fail1;
+        goto fail2;
 
     Packet->Mdl = Mdl;
     Packet->Offset = Offset;
@@ -5206,6 +5210,9 @@ TransmitterQueuePacket(
 
     return STATUS_SUCCESS;
 
+fail2:
+    Error("fail2\n");
+
 fail1:
     Error("fail1 (%08x)\n", status);
 
-- 
2.25.0.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.