Project

General

Profile

Actions

Bug #8250

closed

libnsl: Raw RPC client sends unlimited data

Added by Marcel Telka over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-05-18
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

Both clnt_raw_call() and 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.


Files

test.c (1.67 KB) test.c Marcel Telka, 2017-05-18 04:40 PM
Actions #1

Updated by Marcel Telka over 6 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.

Actions #2

Updated by Marcel Telka over 6 years ago

  • Subject changed from Raw RPC client sends unlimited data to libnsl: Raw RPC client sends unlimited data
Actions #4

Updated by Marcel Telka over 6 years ago

  • Status changed from In Progress to Pending RTI
Actions #5

Updated by Electric Monk over 6 years ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit 2a6fb28d0877f35efb94c09cc03e8088426d0c30

commit  2a6fb28d0877f35efb94c09cc03e8088426d0c30
Author: Marcel Telka <marcel@telka.sk>
Date:   2017-06-08T14:25:31.000Z

    8250 libnsl: Raw RPC client sends unlimited data
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF