Commits
- Commit:
9f799d905510b1fc86562dd95e2d31c02bf72ee8- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Standardize logging with bgpd
Tweak and OK claudio@
- Commit:
4a9fc8a790b8f50642beb4705ca291fe19d5ed83- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
remove empty server_http_init
OK claudio
- Commit:
694ec0880553af9db8df9b0ea713be7755c1fd00- From:
- claudio <claudio@openbsd.org>
- Date:
Error out on presence of Content-Length and Transfer-Encoding headers
for GET, HEAD and other methods that should have no body.
Ignoring the Content-Length header makes httpd vulnerable to
HTTP request smuggling. A crafted GET request may embed an extra
HTTP request which could bypass a proxy or WAF but then is handled
by httpd.
Remove the special case for TRACE and CONNECT in the Content-Length
handling. Move those checks into the method switch at the end of the
header parsing phase and by that also cover more methods including
GET and HEAD. If either header is present simply abort the connection,
nobody should send extra data along GET and HEAD requests.
Add an an explicit HTTP_METHOD_TRACE case above the default case
to indicated that we deliberately don't handle TRACE requests.
This security vulnerability was found by Nicola Staller of SySS GmbH.
With and OK rsadowski@ previous version also OK florian@
- Commit:
5e36945a5e19c646c571b6400ed1cb5a0871257f- From:
- claudio <claudio@openbsd.org>
- Date:
In server_read_httpchunks() do not blindly enable the bufferevent.
This leads to a use-after-free since the bev->readcb() call could free
the memory holding the bev right before the bufferevent_enable() call.
Reported by Pontus Stenetorp.
OK florian@ rsadowski@
- Commit:
6fb75f225b8e1b02f81416fe1b987197a37648ef- From:
- schwarze <schwarze@openbsd.org>
- Date:
Slightly iprove a confusing wording in the parse.y manuals:
The things that need quoting are not necessarily "argument names",
and not even necessarily "names" at all, so just talk about "arguments".
"I guess?" florian@ and no objection from otto@, both back in July 2025.
Actually, the quoting rules are more complicated than the text makes
believe, but i do not know how to better describe them. It may not be
easy because some suspect the implementation may be somewhat adhoc
rather than based on cleary defined lexical rules.
- Commit:
a030517f060ffc45f3e3d1eebe8ad427384dc72f- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
validate return_uri_len before copying data
Spotted by tb@, ok claudio
- Commit:
38978fc61e39a54dc2f9e25e2a3222b5dd5fa4b6- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
fix scan-build dead stores findings
- httpd.c:533 – q assigned but immediately overwritten in the loop
- server.c:891 – inrd/inwr assigned, then reassigned, never actually needed
- server_fcgi.c:678,690 – kv result unused
OK stsp@
- Commit:
6e77fedee83d3eef0426acdc4504910f97cf4b48- From:
- tb <tb@openbsd.org>
- Date:
httpd: fix server_http_time() to emit GMT times again
The HTTP standard RFC 9110 requires GMT, in HTTP-date. We used to do this
until a recent change to localtime.c changed GMT to UTC.
From Sören Tempel, ok sthen
- Commit:
3f1c295feef22d2d6550dc7686e2c0f94b67d306- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Add "no banner" option to suppress Server header
Introduces a global and per-server "[no] banner" directive that prevents httpd
from sending the Server HTTP response header and removes server identification
from error documents. The SERVER_SOFTWARE CGI environment variable remains set
as required by RFC 3875.
Diff by Lloyd (thanks), ok kirill@
- Commit:
4525f6dfc124f7f28ef2bca450dcc8500826d19f- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Add missing GZIP_STATIC flag to SRVFLAG_BITS macro
GZIP_STATIC flag at position \33 was missing from the debug string.
Also correct the truncated PATH_REWRITE/NO_PATH_REWRITE flag names.
The PATH_REWRITE and NO_PATH_REWRITE flag names were truncated to
PATH and NO_PATH in the SRVFLAG_BITS string definition.
OK kirill@ deraadt@
- Commit:
afc41fe08300310c8fc6ef0007438e5a8b5907fe- From:
- deraadt <deraadt@openbsd.org>
- Date:
Systopia team at UBC found 5 info leaks in the private privsep protocol
between httpd programs, and provided a fix.
ok claudio benno florian
- Commit:
8dcab0e2df9c42f05eed6ffb1422d251ca15cb71- From:
- schwarze <schwarze@openbsd.org>
- Date:
Make internal hyperlinking work by moving custom sections from .Sh to .Ss
and the titles from all caps to sentence case such that they match the
table of contents, and switch from .Sy to .Sx as needed.
OK florian@
- Commit:
6859aa4cb8eaaf4776e85b5508e8ad808651caad- From:
- schwarze <schwarze@openbsd.org>
- Date:
In the manual pages for configuration files based on parse.y, describe
the syntax of both defining and using macros, rather than exclusively
relying on examples, which some of the pages do not even provide.
In those pages containing tables of content, also clarify that
the "Macros" section contains *definitions* of variables.
Both changes were already committed to vm.conf(5) earlier.
In those few pages that referenced cpp(1) and m4(1), stop doing that
because the macro definition syntax and the macro dereferencing syntax
of both languages is totally different from the parse.y syntax.
OK florian@, and deraadt also requests keeping these manuals in sync.
- Commit:
fbc6024ac5b1e2cb04c968555cc9360de1c12bc8- From:
- florian <florian@openbsd.org>
- Date:
Set correct request timeout once we found the correct server block.
On accept(2), httpd(8) sets the timeout based on ip:port. Once we have
parsed the http headers we can find the name-based server block and
apply its request timeout.
Problem identified and fix from Nick Owens, thanks!
OK tb
- Commit:
78044f5e33d9650ea644a1c64770dd318e39e1f5- From:
- claudio <claudio@openbsd.org>
- Date:
Convert various reyk proc.c daemons over to new imsgbuf_init and
imsgbuf_allow_fdpass.
OK tb@
- Commit:
5728bd4f29e4bd6eafe8898abea7758b4e84015b- From:
- claudio <claudio@openbsd.org>
- Date:
Convert the common imsgbuf_read calls to the post EAGAIN world.
OK tb@
- Commit:
9d8a74db131fbfce7fbfec4a594b78a3ceac6d13- From:
- claudio <claudio@openbsd.org>
- Date:
Use imsgbuf_queuelen() instead of accessing the w.queue member.
OK tb@
- Commit:
844b37325f8bb51d3f034fba6b4d7b3808659b9e- From:
- claudio <claudio@openbsd.org>
- Date:
Use imsgbuf_clear() where appropriate instead of msgbuf_clear().
OK tb@
- Commit:
59aee4e5b492bad8dcaaaad9dd710b9619a07a50- From:
- claudio <claudio@openbsd.org>
- Date:
Rename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush to
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.
This separates the imsgbuf API from the per-imsg API.
OK tb@
- Commit:
7ab7287f2568cf0384497707d95581957ec29e56- From:
- claudio <claudio@openbsd.org>
- Date:
Convert imsg_write() callers to the new simplified return logic.
OK tb@
- Commit:
e7965818e16df6d5a47fdfeb7753c447c80677a9- From:
- claudio <claudio@openbsd.org>
- Date:
Introduce imsg_write() and use it instead of msgbuf_write().
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.
OK tb@
- Commit:
63ca1296237357eb9917f051f6b3fbfedeb68440- From:
- claudio <claudio@openbsd.org>
- Date:
imsg_flush no longer returns EAGAIN. Simplify proc_flush_imsg() accordingly.
Issue spotted by op@
- Commit:
311b16add548240ef3b56166d4d36e9373457bf9- From:
- jsg <jsg@openbsd.org>
- Date:
remove unused struct
- Commit:
a426da1cc01d1546e24759bc9ae6c0bde1b7e074- From:
- op <op@openbsd.org>
- Date:
httpd: render "emojis" as text in directory listing
The "up and down" character used in the directory listing is
technically an emoji and can, depending on the browser configuration,
be rendered in colors and whatnot. set `font-variant-emoji' to ask
the browser to render it as text. This property, as of now, needs
to be enabled manually in some browsers, but since it's part of the
"CSS Fonts Module Level 4" spec, support for it is expected to be
implemented and turned on "soon" in major browsers.
While here, remove the italic for directories.
Diff from Paul W. Rankin (hello (at) paulwrankin dot com)
ok claudio@
- Commit:
050dfc424dd88dad7ef6b0a4e046c0cf08cab81a- From:
- florian <florian@openbsd.org>
- Date:
plug fd leak introduced in "avoid toctu" rewrite.
Issue reported by job
OK tb, job
