Replace uses of select() or ensure array bounds checks
Categories
(Core :: General, defect, P2)
Tracking
()
People
(Reporter: jld, Assigned: jld)
References
Details
(Keywords: sec-audit, Whiteboard: [adv-main72-] [post-critasmash-triage])
Attachments
(2 files)
This is a followup to bug 1516325. We have a few other uses of select
that could cause problems as far as the array bounds for fd_set
; they're generally not security-sensitive because they're specific to Linux (where glibc has bounds checks, so we'll crash safely) or apply to file descriptors allocated early (so the values will normally be in bounds) or in code that we're reasonably sure is dead in our usage. However, these should be fixed to avoid crashes and possible future security bugs.
I'm filing this bug as security-sensitive because bug 1516325 isn't on release yet, and landing these fixes is going to make it even more obvious than it already is what's going on there.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Status: I have patches, but I need to clean them up (and, at this point, rebase them); it's a little delicate because of the connection to a security bug and there always seem to be higher priorities….
Assignee | ||
Comment 2•5 years ago
|
||
The select
s in WebRTC's video_capture
subtree were independently fixed in bug 1590984 after they were encountered in the wild (and caught via glibc's bounds checks). I'll upload the other patches.
Assignee | ||
Comment 3•5 years ago
|
||
These are single-fd polls of the X server socket, which in practice will
be much smaller than FD_SETSIZE, but it's cleaner to just not have the
fixed-size array in the first place.
Assignee | ||
Comment 4•5 years ago
|
||
PhysicalSocketServer isn't currently used by Mozilla's WebRTC
integration, but just in case, let's make sure that this array index is
bounds-checked in actual use, not just in debug builds (which tend to
never see realistic test conditions).
Assignee | ||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Sounds like this fix can ride the trains, but feel free to nominate for uplift if you feel strongly otherwise.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Description
•