Race condition in ether_ifattach
- Reply: Zhenlei Huang : "Re: Race condition in ether_ifattach"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 May 2025 13:13:30 UTC
There appears to be a race condition in ether_ifattach (if_ethersubr.c). The ether_ifattach() function calls if_attach, where the interface will get announced, and then ether_ifattach continues with the initialization of the ifp. Is there any guarantee in FreeBSD that this race condition cannot be exposed. We have been running the FreeBSD stack for some time under QNX and have just recently run into an issue with this race condition. We are considering a modification where we have the option of deferring the interface announcement in if_attach. Before opening a FreeBSD bug, I wanted to check if this issue would not be valid in a FreeBSD system. It’s very clear that there is a potential race when looking at the code, but perhaps there is a mitigation that is not obvious. ---------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.