diff --git a/repos/os/include/usb_session/device.h b/repos/os/include/usb_session/device.h index 765d819425..ac1682414d 100644 --- a/repos/os/include/usb_session/device.h +++ b/repos/os/include/usb_session/device.h @@ -304,6 +304,9 @@ class Usb::Urb_handler Packet_descriptor const p { urb._payload.offset, urb._payload.bytes }; fn(static_cast(urb)); + + /* clear potentially sensitive packet content */ + memset(_tx.source()->packet_content(p), 0, p.size()); _tx.source()->release_packet(p); }; @@ -586,6 +589,8 @@ bool Usb::Urb_handler::_try_process_ack(Tx::Source &tx, warning("spurious usb-session urb acknowledgement"); } + /* clear potentially sensitive packet content */ + memset(tx.packet_content(p), 0, p.size()); tx.release_packet(p); return true; }