View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006666 | unreal | ircd | public | 2026-11-15 01:50 | 2026-11-15 01:50 |
| Reporter | gh0st | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 6.2.7.1 | ||||
| Summary | 0006666: UNIX socket path over 108 bytes: unlink() uses full path, bind() uses truncated one, so restart fails | ||||
| Description | In src/socket.c, the UNIX domain socket listener (around line 1586) does: unlink(ip); /* full path */ strlcpy(server.sun_path, ip, sizeof(server.sun_path)); /* truncated to 108 */ When the socket path is longer than sun_path (108 bytes on Linux), e.g. with a deep install directory, unlink() removes the full (non-existent) path while bind() creates the socket at the truncated path. The stale socket from the previous run is therefore never cleaned up, and the next start fails with: Could not listen on UNIX domain socket ... Address already in use | ||||
| Steps To Reproduce | 1. Install UnrealIRCd under a deep directory so the control socket path (data/unrealircd.ctl or a listen { file ...; } path) is longer than 108 bytes. 2. Start the server, then stop it uncleanly (e.g. kill -9) so the socket file is left behind. 3. Start it again: listening on the UNIX socket fails with 'Address already in use'. | ||||
| Additional Information | Suggested fix: reject socket paths that don't fit in sun_path with a clear config error (preferred, since a silently truncated path also isn't where the user expects it), or at least unlink() the truncated path that is actually bound. Reported by gh0st ([email protected]). | ||||
| 3rd party modules | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-15 01:50 | gh0st | New Issue |