Summary: | jail(8) fails to parse ipv6 addr correctly | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Sean Bruno <sbruno> | ||||||
Component: | arm | Assignee: | Andrew Turner <Andrew> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | Andrew, emaste | ||||||
Priority: | --- | ||||||||
Version: | CURRENT | ||||||||
Hardware: | arm64 | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Sean Bruno
2020-03-27 15:15:45 UTC
Created attachment 212756 [details]
Remove comments and command line faff.
Andy created a patch that fixes this issue. I have tested and verified it on thunderx2 in the freebsd cluster. It was also tested/verifed on several other ARM devices in #bsdmips. https://people.freebsd.org/~andrew/0001-Use-memmove-to-copy-within-a-buffer.patch A commit references this bug: Author: andrew Date: Wed Apr 1 09:51:30 UTC 2020 New revision: 359505 URL: https://svnweb.freebsd.org/changeset/base/359505 Log: Use memmove to copy within a buffer jail(8) would try to use strcpy to remove the interface from the start of an IP address. This is undefined, and on arm64 will result in unexpected IPv6 addresses. Fix this by using memmove top move the string. PR: 245102 Reported by: sbruno MFC after: 2 weeks Sponsored by: Innovate UK Changes: head/usr.sbin/jail/config.c ^Triage: committed back in 2020. |