librpc: Make CFDATA private to cab.idl and remove pull and push functions
authorAndrew Bartlett <abartlet@samba.org>
Tue, 19 Nov 2019 03:07:50 +0000 (16:07 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 29 Nov 2019 00:44:40 +0000 (00:44 +0000)
commitbd81733bb7c5af3fb2f98bf475d53507c3955b31
tree1d4d3d1003a59fb3157d18251bec32c235c47a62
parent12b3f26eee88ac810d08197d64019f5c4cfa2a03
librpc: Make CFDATA private to cab.idl and remove pull and push functions

We can do this because ndr_{pull,push}_CFDATA is unused.

The earlier commit 466d5e814727046dd630d5503b43874ec46a365e removed
the link between "uint16 cbData" and the size of "DATA_BLOB ab" so
when the new ndr_fuzz_X fusser pushed a new structure this allowed
a read beyond the end of allocated memory.

The ndr_push_cab_file() function is also manually written and
does not rely on the value of cbData to calculate the checksum.

Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X
fuzzer, which like ndrdump's struct mode uses the public structure
tables.  (This is how it found the unused functions to test).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
librpc/idl/cab.idl