Skip to content

Commit

Permalink
tests: replace the LDAP OSS-Fuzz testcase
Browse files Browse the repository at this point in the history
The original testcase triggers a separate issue on 32-bit machines:
secdev#4527 and it should probably be
tested separately. The new testcase triggers the issue fixed in
1935723 only:
```sh
>>> assert l[0][LDAP].summary() == "LDAP"
Traceback (most recent call last):
  File "<input>", line 2, in <module>
  File "scapy/scapy/packet.py", line 1692, in summary
    return self._do_summary()[1]
           ^^^^^^^^^^^^^^^^^^
  File "scapy/scapy/packet.py", line 1669, in _do_summary
    ret = self.mysummary()
          ^^^^^^^^^^^^^^^^
  File "scapy/scapy/layers/ldap.py", line 736, in mysummary
    self.messageID.val,
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'val'
```
  • Loading branch information
evverx committed Sep 7, 2024
1 parent 2cdf191 commit 518698c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/regression.uts
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ file = BytesIO(b"\n\r\r\n\x00\x00\x008\x1a+<M\x00\x01\x00\x00\xef\xff\xff\x81\x0
l = rdpcap(file)

# Issue #69628
file = BytesIO(b"M<\xb2\xa1 \x00\xff\xf9\xff\x00\x00\xff\xff\xff\xa1\xb2<M\x01\x00\x00\x00\x00\x00\x00\x17\xca\xca\xca\xca\xca\xca\xca\xca\xca\xca\r\x80\x01[\x00\x01noenum\x00\x00\x00\x00\x00\x06value\x01\x00\x00\x00\x00\x00\x00\x01\x85\xff\xff\x00\x00\x94\xc3\x000\x00\x08\xa0\xf30\x800\x000\x00")
file = BytesIO(b"\xd4\xc3\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x01\x00\x00\x00\x04{\xdcf\xc2\xa5\x07\x008\x00\x00\x008\x00\x00\x00A]+\xdb]\x04\x8e(6\n\x99\xcb\x08\x00E\x00\x00*\x00\x01\x00\x00@\x06\xe3V\x07\x87\xa5m\x17\x15\xd3m\x01\x85\x01\x85\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\xc5_\x00\x000\x00")
l = rdpcap(file)
assert l[0][LDAP].summary() == "LDAP"

Expand Down

0 comments on commit 518698c

Please sign in to comment.