Bug 216259 - Setting SO_OOBINLINE after receiving OOB data over TCP can cause that data to be received again
Summary: Setting SO_OOBINLINE after receiving OOB data over TCP can cause that data to...
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-18 17:34 UTC by Zebediah Figura
Modified: 2022-07-18 17:40 UTC (History)
0 users

See Also:
Kernel Version: 5.17.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
test program demonstrating the bug (2.72 KB, text/plain)
2022-07-18 17:34 UTC, Zebediah Figura
Details

Description Zebediah Figura 2022-07-18 17:34:38 UTC
Created attachment 301451 [details]
test program demonstrating the bug

I'm not sure if this is a bug—I haven't fully read specs and perhaps it's within spec for OOBINLINE or TCP or something—but it certainly looks like one.

The attached test program demonstrates the bug, and probably more clearly than any verbal description. It sends and receives a byte of OOB data over a (loopback) socket pair, sets the receiving socket to SO_OOBINLINE, and then calls recv() again (without MSG_OOB). This results in the same byte being received again.

If on the other hand a recv() call is made before setting SO_OOBINLINE [guarded out with if(0)], the offending call does not succeed, which heightens my suspicion that this is a bug.
Comment 1 Zebediah Figura 2022-07-18 17:40:15 UTC
FWIW, I don't think this is a high priority. It's something that came up while trying to write Wine unit tests, so it certainly isn't known to affect any real applications.

Note You need to log in before you can comment on or make changes to this bug.