MIR: libmicrohttpd
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | libmicrohttpd (Debian) |
Fix Released
|
Unknown
|
||
| | libmicrohttpd (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
Availability: builds on all architectures
Rationale:
- Used by systemd's remote journal support; we'd like to enable this as it provides nice and secure (over SSL) logging for devices without much space, or writable root etc. Users are asking for it (bug 1480952) and it's also a nice feature for snappy.
- Enablement done in Debian: http://
Security: two issues in the past (http://
QA/maintenance:
- Just a library, no user interface; no debconf,
- No serious, and very few bug reports in Debian/Ubuntu
- Standard dh7/dh_install packaging, no oddities
- Adequate package maintenance in Debian, no Ubuntu delta planned
- Adequate upstream maintenance: Search for "microhttp" on https:/
- Package has watch file
- /!\ Package has some automatic tests, and some example C programs for manual testing; not enabled during package build
Dependencies: all build/binary deps already in main
Note that at least for now we don't necessarily need to put the new systemd-
| Michael Terry (mterry) wrote : | #2 |
Blockers:
- Tests should be run indeed, thanks for looking into that.
- Needs a team bug subscriber for whomever will look after this in Ubuntu.
Notes:
- I wish it passed --disable-spdy in debian/rules, because when building on a machine with libopenssl, it will automatically enable that and fail the build because of --fail-missing.
- This seems like a security sensitive package. Will subscribe ubuntu-security for a looksee.
Otherwise, it looks fine.
| Changed in libmicrohttpd (Ubuntu): | |
| assignee: | nobody → Ubuntu Security Team (ubuntu-security) |
| status: | New → Incomplete |
| Seth Arnold (seth-arnold) wrote : | #3 |
Does any of this code run in pid 1 when enabled?
Thanks
| Martin Pitt (pitti) wrote : | #4 |
> Does any of this code run in pid 1 when enabled?
No. This is only used by the split-out systemd-
User=systemd-
Group=systemd-
PrivateTmp=yes
PrivateDevices=yes
PrivateNetwork=yes
ProtectSystem=full
ProtectHome=yes
So this can't access /home at all, the root partition will be readonly for it, it does not have /dev access (just a small /dev/null and /dev/zero private dev). Its sole purpose is to expose /{var,run}
| Martin Pitt (pitti) wrote : | #5 |
Apparently CVE's search doesn't match word substrings; I adjusted the description accordingly, there *were* two CVEs in the past. Sorry for the initially incorrect information.
| description: | updated |
| Martin Pitt (pitti) wrote : | #6 |
https:/
| Changed in libmicrohttpd (Ubuntu): | |
| status: | Incomplete → New |
| Martin Pitt (pitti) wrote : | #7 |
I am also subscibed to bugs now.
| Changed in libmicrohttpd (Debian): | |
| status: | Unknown → New |
| Martin Pitt (pitti) wrote : | #8 |
FTR, I dropped my personal bug subscription and subscribed foundations-bugs now.
| Martin Pitt (pitti) wrote : | #9 |
Second Debian bug with the autopkgtest is https:/
| Changed in libmicrohttpd (Debian): | |
| status: | New → Fix Committed |
| Changed in libmicrohttpd (Debian): | |
| status: | Fix Committed → Fix Released |
| Martin Pitt (pitti) wrote : | #10 |
@mterry:
> - I wish it passed --disable-spdy in debian/rules, because when building on a machine with libopenssl, it will automatically enable that and fail the build because of --fail-missing.
This has been fixed in Debian now: https:/
@Seth: Do you need any further security info about this?
Thanks!
On 2015-10-14 07:54:49, Martin Pitt wrote:
> @Seth: Do you need any further security info about this?
I don't think we need any further security info at this time. We'll do a
shallow security audit of libmicrohttpd during the 16.04 devel cycle and
report back at that time.
| Seth Arnold (seth-arnold) wrote : | #12 |
I'd prefer to disable SPDY entirely; based on what I saw, I'm not sure that it's ready to be packaged.
Thanks
| Seth Arnold (seth-arnold) wrote : | #13 |
I reviewed libmicrohttpd version 0.9.44+dfsg-1 as checked into xenial.
This shouldn't be considered a full security audit, but rather a quick
gauge of maintainability.
- [item elided]
- parse_uri() does not check error returns from asprintf()
- store_in_buffer() can leak 'dst' if realloc() fails
- SPDYF_start_
addresses as identical struct sockaddr types. However,
SPDYF_
as if it were a struct sockaddr_in6. I suggest using ASAN or valgrind
with this with IPv6 addresses.
And some more subjective feedback:
- SPDYF_run() select(2) is a cranky interface, I'd pick something else
first. select(2) can't handle file descriptors larger than 1024, which
limits the utility of the server.
- Much of the code needs to be run through indent; the project ought to
pick a coding style and enforce it. Mixing coding styles within one
source file is exhausting to read.
- Commented out code is confusing. Consider deleting each piece of
commented out code.
Lintian errors and warnings:
E: libmicrohttpd10: postinst-
W: libmicrohttpd-dev: info-document-
E: libmicrospdy0: postinst-
The build logs are slightly noisy with ignored error returns from read(),
write(), asprintf() and dpkg-gencontrol warnings about -is and -ip
parameters.
Much of the code looks careful and professional. Some of the code looks
very immature and probably shouldn't have made it into a "library
release", even with a version number 0.9.something.
I think we should disable the SPDY libraries in our packaging: there's a
lot of work left before they're production-ready, and I would not expect
ABI or API stability from this library.
ACK from the security team for promoting libmicrohttpd to main with the
provision that the SPDY libraries are either no longer built or remain in
universe. We suggest removing them for the time being.
Please also address the lintian warnings and errors before release.
Thanks
| Changed in libmicrohttpd (Ubuntu): | |
| assignee: | Ubuntu Security Team (ubuntu-security) → nobody |
| Martin Pitt (pitti) wrote : | #14 |
Thanks Seth!
I disabled the SPDY packages and added the missing PNG for the info page in https:/
I'll forward the .png fix to Debian.
So this looks approved now, I'll upload systemd with enabling remote journal next week. Thanks!
| Changed in libmicrohttpd (Ubuntu): | |
| status: | New → Fix Committed |
| Seth Arnold (seth-arnold) wrote : | #15 |
Thanks Martin,
Christian reported to me that he just released "MHD 0.9.47 without libmicrospdy in it" -- that may be a cleaner way to remove the spdy packages.
Thanks
| Martin Pitt (pitti) wrote : | #16 |
Seth Arnold [2015-12-08 19:28 -0000]:
> Christian reported to me that he just released "MHD 0.9.47 without
> libmicrospdy in it" -- that may be a cleaner way to remove the spdy
> packages.
Indeed! So we can sync again once Debian updates to the new release.
| Martin Pitt (pitti) wrote : | #17 |
I uploaded systemd with the build-dep and promoted the package. Thanks for the review!
| Changed in libmicrohttpd (Ubuntu): | |
| status: | Fix Committed → Fix Released |


If this is otherwise fine, I'll work on running the tests during package build.