b25389e5 | 02-Aug-2021 |
Sui Chen <suichen@google.com> |
dbus-pcap: Handle UNIX_FD and Array of UINT32
1) This message captured on a desktop system caused an error in AlignedStream.align, so lines 169 and 170 are added to fix the error:
(CookedMessage(he
dbus-pcap: Handle UNIX_FD and Array of UINT32
1) This message captured on a desktop system caused an error in AlignedStream.align, so lines 169 and 170 are added to fix the error:
(CookedMessage(header=CookedHeader()]), body=['org.freedesktop. NetworkManager.IP6Config', [['Addresses', [[[x, x, ..., x], x, ... ], ['AddressData', [[['address', 'some ipv6 addr'], ['prefix', x]], ...], ['Routes', [[[x, x, x, x, x, x, x], x, ...], ['RouteData', [[['dest', 'some ipv6 addr'], ['prefix', x], ['metric', x]], ['next-hop', 'some ipv6 address'], ['metric', x]], ]]]]]]]])
2) This message captured on a desktop system contains a UNIX_FD, line 128 is added to make the parse process pass:
(CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=2, flags=1, version=1, length=8, cookie=3541), fields= [Field(type=<MessageFieldType.REPLY_SERIAL: 5>, data=40), Field(type=<MessageFieldType.DESTINATION: 6>, data=':1.67459'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='hb'), Field(type=<MessageFieldType.UNIX_FDS: 9>, data=1), Field(type=<MessageFieldType.SENDER: 7>, data=':1.1')]), body=[0, 0])
Change-Id: I02ba32b026ebf5346937aa8b264338dd91d91b98 Signed-off-by: Sui Chen <suichen6@gmail.com>
show more ...
|
54e0c9ae | 10-Sep-2020 |
Sui Chen <suichen@google.com> |
dbus-pcap: Parse headers of large messages
When encountering a large message that got truncated, instead of raising a MalformedPacketError and completely ignoring the message, parse as much as possi
dbus-pcap: Parse headers of large messages
When encountering a large message that got truncated, instead of raising a MalformedPacketError and completely ignoring the message, parse as much as possible (in this case, its header) so that it can still be used for certain purposes, such as to match method calls and method returns.
Tested: compared against WireShark outputs (WireShark is able to handle truncated messages) and manually inspecting parsed results.
One example message: CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=2, flags=1, version=1, length=125272, cookie=3543), fields=[Field(type=<MessageFieldType.REPLY_SERIAL: 5>, data=2), Field(type=<MessageFieldType.DESTINATION: 6>, data=':1.1145'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='a{oa{sa{sv}}}'), Field(type=<MessageFieldType.SENDER: 7>, data=':1.628')]), body=[])
Signed-off-by: Sui Chen <suichen@google.com> Change-Id: Ie415735aef2b1c0bf6f27c509684964ccd87d1d9
show more ...
|