New issue
Advanced search Search tips

Issue 699511 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

sendmsg/recvmsg implementations in nacl_io send/recieve multiple messages

Reported by dennis.h...@gmail.com, Mar 8 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
* Use a NaCl SDK build from a recent Chromium checkout (not sure which actual Pepper releases this affects, if any).
* Create a NaCl module that uses nacl_io.
* Create a UDP socket and use either recvmsg or sendmsg with msg->msg_iovlen > 1.
* Observe how the implementation in nacl_io will send (or receive) two or more UDP packets.

What is the expected behavior?
Both sendmsg and recvmsg should operate on a single message, as specified by POSIX.

https://linux.die.net/man/2/sendmsg
http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendmsg.html

What went wrong?
The current recvmsg and sendmsg implementations (in src/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc, introduced in 710a20c325affb4c79d86680e2e365383e0f9759) will send/receive multiple messages if msg->msg_iovlen is greater than 1. However, a correct implementation should send only a single message and just interpret the msg->msg_iov array as a scattered buffer.

This matters for example if the underlying socket is a UDP socket.

Did this work before? N/A 

Chrome version: 56.0.2924.87  Channel: n/a
OS Version: 
Flash Version:


 
Components: Platform>NaCl
Labels: TE-NeedsTriageHelp
Components: -Platform>DevTools
Removing Platform>DevTools label. (DevTools refers to Chrome Developer Tools which is the set of external-facing tools used by web developers).
Sorry about the wrong label, I couldn't find NaCl anywhere when I submitted this bug.
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 19 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment