| Summary: | SOCK_DGRAM socket option IP_RECVORIGDSTADDR doesn't work | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Iybego <iybego> | ||||||
| Component: | kernel | Assignee: | Neil Horman <nhorman> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 25 | CC: | cz172638, gansalmon, ichavero, itamar, iybego, jonathan, kernel-maint, labbott, madhu.chinakonda, mchehab, nhorman | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2017-02-28 22:20:55 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
hmm, I'm not sure why there is a length validation in the cmsg add routine int he kernel, but thats where it seems to be failing. Let me look into the why behind that. hmm, odder still, printed out the skb_transport_offset and length fields, and the transport offset was -8, which implies that the transport pointer points to a space lower in memory than the data pointer, which is definitely odd. Continuing to look into this note to self: problem may exist in udp_v4_early_demux *********** MASS BUG UPDATE ************** We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs. Fedora 25 has now been rebased to 4.9.3-200.fc25. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26. If you experience different issues, please open a new bug report for those. Problem still exists with: 4.9.3-200.fc25.x86_64 #1 SMP Fri Jan 13 01:01:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Think I found the problem. Can you apply this patch and see if the problem abates? Created attachment 1249106 [details]
patchto fix IP_RECVORIGDTADDR
Thanks! Looks like its works well! ==== testing [IP_RECVORIGDSTADDR] binded to port 43123 cmsg received [level: 0, type: 20] IP_ORIGDSTADDR received ^ looks like all ok! grats! ==== testing [OK] That fix is now in the 4.9.x stable tree. Thanks for reporting the bug and thank you Neil for pointing out the fix. |
Created attachment 1224772 [details] small autotest for IP_RECVORIGDSTADDR Description of problem: Even if i set IP_RECVORIGDSTADDR on SOCK_DGRAM, i doesn't receive IP_ORIGDSTADDR in CMSG Version-Release number of selected component (if applicable): kernel 4.8.8-300.fc25.x86_64 How reproducible: Attached small autotest. Just do say "make" and test will be compiled and started. Steps to Reproduce: 1. Enable IP_RECVORIGDSTADDR on SOCK_DGRAM socket 2. Use recvmsg with CMSG buffer specified 3. Scan CMSG buffer against IP_ORIGDSTADDR Actual results: ==== testing [IP_RECVORIGDSTADDR] binded to port 38886 failure: [SOL_IP, IP_ORIGDSTADDR] doesn't exists in CMSG! ==== testing [FAILED] Expected results: On kernel 3.10.49 its works and returns: ==== testing [IP_RECVORIGDSTADDR] binded to port 43699 cmsg received [level: 0, type: 20] IP_ORIGDSTADDR received ^ looks like all ok! grats! ==== testing [OK]