libnsl: Raw RPC client sends unlimited data
clnt_raw_send() functions does not pass to the raw RPC server the size of data they are sending. This makes some RPC testing scenarios hard to implement.
Updated by Marcel Telka over 3 years ago
The problem can be reproduced using the attached test:
$ ./test Raw: Server received: 12345678 Server received: 12345678 Door: Server received: 12345678 clnt_send #2 failed: RPC: Server can't decode arguments $
The test created two RPC servers (raw and door) with the same service dispatch procedure. Then it sent two data packets to each server. The first call is valid, but the second one does not provide enough data for the RPC server. For the second call the door RPC server properly returned an error, while the raw RPC server decoded the received data without noticing that there should be no data available for the decoding.
Updated by Electric Monk over 3 years ago
- Status changed from Pending RTI to Closed
- % Done changed from 0 to 100
commit 2a6fb28d0877f35efb94c09cc03e8088426d0c30 Author: Marcel Telka <firstname.lastname@example.org> Date: 2017-06-08T14:25:31.000Z 8250 libnsl: Raw RPC client sends unlimited data Reviewed by: Yuri Pankov <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>