-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathChangeLog
More file actions
5883 lines (3805 loc) · 172 KB
/
ChangeLog
File metadata and controls
5883 lines (3805 loc) · 172 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2026-03-02 19:24 rsadowski
* usr.sbin/httpd/: config.c, control.c, httpd.c, httpd.h, log.c,
log.h, logger.c, parse.y, proc.c, server.c, server_fcgi.c,
server_http.c: Standardize logging with bgpd
Tweak and OK claudio@
2026-02-28 09:36 rsadowski
* usr.sbin/httpd/: httpd.h, server.c, server_http.c: remove empty
server_http_init
OK claudio
2026-02-27 20:32 bluhm
* usr.bin/htpasswd/htpasswd.c: replace pledge "stdio rpath tmppath"
with unveil "/tmp" "rwc" to satisfy mktemp(3) type operations,
unveil "/" "r" for reading all over the tree, and pledge "stdio
rpath wpath cpath" to permit both unveils subject to their own
limitations.
pledge "rpath tmppath" is replace with unveil "/" "r", unveil
"/tmp" "rwc", and "rpath wpath cpath" from deraadt@; ok semarie
This was using pledge "tmppath" with "rpath wpath cpath". The
"tmppath" is not needed. from deraadt@; ok semarie and others
uses tmpfile(), which is why it used "tmppath", which is why it
now needs "rpath wpath cpath" from deraadt@; spotted by brynet
Instead of pledge "tmppath rpath", setup a "rwc" unveil on
"/tmp", a "r" unveil on "/", and then pledge "rpath wpath cpath".
from deraadt@; ok semarie and others
This is using pledge "tmppath" with "rpath wpath cpath". The
"tmppath" is not needed. from deraadt@; ok semarie and others
These programs are using pledge "tmppath" with "rpath wpath
cpath". The "tmppath" is not needed. from deraadt@; ok semarie
and others
Use unveil() instead of pledge "tmppath". There is a bit of
bulldozering here to handle the many codeflows regarding output
files, and I hope ingo improves it later. from deraadt@; Some
help with regression validation from job
nc(1) has the more crazy unveil + pledge configuration based upon
argument flags. I think this correctly replaces "tmppath" with
an unveil. from deraadt@
Since this program is "rpath wpath cpath", it does not need to
use "tmppath" from deraadt@; ok op
replace pledge "tmppath" with unveil "/tmp" "rwc" and "rpath
wpath cpath". from deraadt@; ok ok
this is errata/7.7/021_tmppath.patch.sig
2026-02-27 20:31 bluhm
* usr.bin/htpasswd/htpasswd.c: replace pledge "stdio rpath tmppath"
with unveil "/tmp" "rwc" to satisfy mktemp(3) type operations,
unveil "/" "r" for reading all over the tree, and pledge "stdio
rpath wpath cpath" to permit both unveils subject to their own
limitations.
pledge "rpath tmppath" is replace with unveil "/" "r", unveil
"/tmp" "rwc", and "rpath wpath cpath" from deraadt@; ok semarie
This was using pledge "tmppath" with "rpath wpath cpath". The
"tmppath" is not needed. from deraadt@; ok semarie and others
uses tmpfile(), which is why it used "tmppath", which is why it
now needs "rpath wpath cpath" from deraadt@; spotted by brynet
Instead of pledge "tmppath rpath", setup a "rwc" unveil on
"/tmp", a "r" unveil on "/", and then pledge "rpath wpath cpath".
from deraadt@; ok semarie and others
This is using pledge "tmppath" with "rpath wpath cpath". The
"tmppath" is not needed. from deraadt@; ok semarie and others
These programs are using pledge "tmppath" with "rpath wpath
cpath". The "tmppath" is not needed. from deraadt@; ok semarie
and others
Use unveil() instead of pledge "tmppath". There is a bit of
bulldozering here to handle the many codeflows regarding output
files, and I hope ingo improves it later. from deraadt@; Some
help with regression validation from job
nc(1) has the more crazy unveil + pledge configuration based upon
argument flags. I think this correctly replaces "tmppath" with
an unveil. from deraadt@
Since this program is "rpath wpath cpath", it does not need to
use "tmppath" from deraadt@; ok op
replace pledge "tmppath" with unveil "/tmp" "rwc" and "rpath
wpath cpath". from deraadt@; ok ok
this is errata/7.8/015_tmppath.patch.sig
2026-02-26 19:49 claudio
* usr.sbin/httpd/server_http.c: 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@
2026-02-18 15:23 deraadt
* usr.bin/htpasswd/htpasswd.c: This is using pledge "tmppath" with
"rpath wpath cpath". The "tmppath" is not needed. ok semarie
and others
2026-02-02 13:44 bluhm
* usr.sbin/httpd/server_http.c: 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. from clauio@; OK florian@
rsadowski@
this is errata/7.7/019_httpd.patch.sig
2026-02-02 13:43 bluhm
* usr.sbin/httpd/server_http.c: 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. from clauio@; OK florian@
rsadowski@
this is errata/7.8/013_httpd.patch.sig
2026-02-02 13:37 claudio
* usr.sbin/httpd/server_http.c: 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@
2026-01-18 16:38 schwarze
* usr.sbin/httpd/httpd.conf.5: 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.
2026-01-04 06:43 rsadowski
* usr.sbin/httpd/config.c: validate return_uri_len before copying
data
Spotted by tb@, ok claudio
2026-01-02 08:45 rsadowski
* usr.sbin/httpd/: httpd.c, server.c, server_fcgi.c: 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@
2025-12-20 23:12 tb
* usr.sbin/httpd/server_http.c: 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
2025-11-28 16:10 rsadowski
* usr.sbin/httpd/: config.c, httpd.conf.5, httpd.h, parse.y,
server_fcgi.c, server_http.c: 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@
2025-11-27 15:22 rsadowski
* usr.sbin/httpd/httpd.h: 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@
2025-11-12 11:24 deraadt
* usr.sbin/httpd/: config.c, httpd.c, parse.y: Systopia team at UBC
found 5 info leaks in the private privsep protocol between httpd
programs, and provided a fix. ok claudio benno florian
2025-07-08 14:26 schwarze
* usr.sbin/httpd/httpd.conf.5: 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@
2025-07-07 20:56 schwarze
* usr.sbin/httpd/httpd.conf.5: 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.
2025-05-26 06:18 anton
* regress/usr.sbin/httpd/patterns/patterns-tester.c: Remove by now
incorrect usage of malloc_options in httpd patterns regress. As
stated in bsd.regress.mk(5), one is advised favor the
MALLOC_OPTIONS environment variable.
2025-02-21 10:19 mbuhl
* etc/examples/httpd.conf: Remove acme-challenge location from
HTTPS server configuration as RFC8555 8.3 explicitly states that
the challenge must be over HTTP.
From Lucas de Sena (lucas AT seninha.org), thanks!
ok sdk@
2024-12-22 13:51 florian
* usr.sbin/httpd/server_http.c: 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
2024-11-26 06:12 tb
* share/mk/bsd.regress.mk: Pass -g to CFLAGS for regression testing
It is annoying to have a regress test crash and then be faced
with question marks in the backtrace, and then have to recompile
and pass -g via DEBUG or similar.
This may bite people with small obj/. Let's see if anyone shouts.
ok anton claudio
2024-11-21 13:38 claudio
* usr.sbin/httpd/: control.c, proc.c: Convert various reyk proc.c
daemons over to new imsgbuf_init and imsgbuf_allow_fdpass.
OK tb@
2024-11-21 13:21 claudio
* usr.sbin/httpd/: control.c, proc.c: Convert the common
imsgbuf_read calls to the post EAGAIN world.
OK tb@
2024-11-21 13:18 claudio
* usr.sbin/httpd/proc.c: Use imsgbuf_queuelen() instead of
accessing the w.queue member.
OK tb@
2024-11-21 13:17 claudio
* usr.sbin/httpd/control.c: Use imsgbuf_clear() where appropriate
instead of msgbuf_clear().
OK tb@
2024-11-21 13:17 claudio
* usr.sbin/httpd/: control.c, proc.c: 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@
2024-11-21 13:16 claudio
* usr.sbin/httpd/: control.c, proc.c: Convert imsg_write() callers
to the new simplified return logic.
OK tb@
2024-11-21 13:10 claudio
* usr.sbin/httpd/: control.c, proc.c: 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@
2024-11-21 13:06 claudio
* usr.sbin/httpd/proc.c: imsg_flush no longer returns EAGAIN.
Simplify proc_flush_imsg() accordingly.
Issue spotted by op@
2024-10-08 05:28 jsg
* usr.sbin/httpd/httpd.h: remove unused struct
2024-06-14 15:12 bluhm
* regress/usr.sbin/httpd/tests/funcs.pl: Replace deprecated
given/when and smartmatch operator in Perl scripts.
2024-06-03 14:46 op
* usr.sbin/httpd/css.h.in: 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@
2024-04-29 16:17 florian
* usr.sbin/httpd/server_file.c: plug fd leak introduced in "avoid
toctu" rewrite.
Issue reported by job OK tb, job
2024-04-16 17:15 florian
* usr.sbin/httpd/server_file.c: Prevent toctu issues in static file
serving and auto index generation.
This fixes a problem in passing, reported by matthieu@ where
httpd would return 500 Internal Server Error when it could
stat(2) but not open(2) a file. The correct error code is 403.
testing matthieu ok tobhe, tl;dr ok stsp input & OK deraadt
2024-04-09 15:48 tobhe
* usr.sbin/httpd/proc.c: Sync removal of setsid(), setpgid() and a
few dup2() from relayd. They are redundant since we call daemon()
earlier.
ok bluhm@
2024-04-08 12:45 tobhe
* usr.sbin/httpd/: httpd.c, proc.c: Call daemon() only in parent
and before proc_exec() to avoid orphaning child processes. Synced
from relayd.
ok kn@
2024-03-24 10:53 job
* usr.sbin/httpd/http.h: Sync with IANA Status Code Registry
From
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
OK sthen@ miod@
2024-02-13 14:00 claudio
* usr.sbin/httpd/server_http.c: Stop logging misleading errors when
custom generic error pages are in use.
Only call the open(2) log_warn for errnos that are not ENOENT.
Since that is an error worth logging.
Based on a diff from Carsten Reith (carsten.reith t-online.de) OK
florian@ deraadt@
2024-01-22 19:26 deraadt
* lib/libc/crypt/cryptutil.c: make login.conf(5) and
crypt_newhash(3) and the underlying code consistant regarding
bcrypt,a instead of blowfish,a. "blowfish" is a historical alias
which we don't need to document as firmly as "bcrypt". report
about difficult manual page discovery from ataraxia937 ok millert
2024-01-17 08:22 claudio
* usr.sbin/httpd/: config.c, logger.c, proc.c: Convert to use
imsg_get_fd() since proc_forward_imsg() never forwards a file
descriptor just use -1 there. OK tb@
2024-01-17 08:20 claudio
* usr.sbin/httpd/config.c: Get all variable-length values for the
parent server before linking the server onto various list. Fixes
a use-after-free if former fails. OK tb@
2024-01-06 11:29 espie
* usr.sbin/httpd/: js.h.in, server_file.c: put the real sizes into
the "title" attribute so that hovering shows the exact value.
adjust/refactor javascript sorter accordingly
2024-01-04 18:17 espie
* usr.sbin/httpd/: Makefile, css.h.in, js.h.in, server_file.c,
toheader.sed: make auto-index better - make it an actual table -
use "human readable sizes" for the file sizes - add some
decoration and javascript to be able to sort it per-column
(client side) (this means some extra column attribute) - add glue
to facilitate embedding js + css directly in the program - add
some graphical indication for directories - should still validate
as proper html everywhere (custom properties need to be called
data-* for this!)
Work with claudio@ and tb@, many thanks to claudio@ for some of
the finer points of css handling, and tb@ for some fine spaces
fixes.
I've tried it with lynx as well, shows up correctly.
One big plus is that the size of columns work as utf-8, so you
can expose filenames without any problems (I've tried it with
non-js text navigators as well as firefox, chromium and friends)
And it looks slightly less yahoo ca. 1995.
It's still "one size fits all". If people object to the current
look, adding httpd.conf(5) properties to override the default css
should be easy.
okay claudio@, tb@
2023-12-28 18:05 espie
* usr.sbin/httpd/server_file.c: don't add values we won't print,
use scandir properly
okay tb@
(logic NOT simplified because I don't want to risk introducing
bugs, and the compiler knows as much boolean logic as me)
2023-11-20 18:17 bluhm
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Avoid a NULL
dereference when handling a malformed fastcgi request.
Rework the hack to avoid a use-after-free in the fastcgi code.
Since server_fcgi() can be called by server_read_httpcontent() we
can't set clt_fcgi_error to NULL. Instead, we implement a simple
reference count to track when a fastcgi session is in progress to
avoid closing the http session prematurely on fastcgi error.
Based on a diff from and OK by tb@. Reported by Ben Kallus.
from millert@
this is errata/7.3/020_httpd.patch.sig
2023-11-20 18:14 bluhm
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Avoid a NULL
dereference when handling a malformed fastcgi request.
Rework the hack to avoid a use-after-free in the fastcgi code.
Since server_fcgi() can be called by server_read_httpcontent() we
can't set clt_fcgi_error to NULL. Instead, we implement a simple
reference count to track when a fastcgi session is in progress to
avoid closing the http session prematurely on fastcgi error.
Based on a diff from and OK by tb@. Reported by Ben Kallus.
from millert@
this is errata/7.4/006_httpd.patch.sig
2023-11-08 19:19 millert
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Avoid a NULL
dereference when handling a malformed fastcgi request.
Rework the hack to avoid a use-after-free in the fastcgi code.
Since server_fcgi() can be called by server_read_httpcontent() we
can't set clt_fcgi_error to NULL. Instead, we implement a simple
reference count to track when a fastcgi session is in progress to
avoid closing the http session prematurely on fastcgi error.
Based on a diff from and OK by tb@. Reported by Ben Kallus.
2023-11-08 11:17 deraadt
* usr.sbin/httpd/patterns.7: remove accidental double space
2023-11-03 13:03 espie
* usr.sbin/httpd/httpd.conf.5: Be explicit in saying what a shell
pattern is. I'm not a big fan of idiosyncratic lua patterns,
especially in that context, but pointing towards them and not
mentionning glob(7) is thoroughly confusing. Don't push lua
patterns down people throats !
At least you know what the incredibly fuzzy "shell patterns"
refers to now !
okay millert@, jmc@
2023-10-29 11:27 kn
* usr.sbin/httpd/httpd.conf.5: Unmention/don't explain SSL, drop 9y
old "ssl" keyword/deprecation warning
Switch "ssl" to "tls" in relayd.conf(5) if you haven't done so in
the last ten years, "ssl" is now an error.
Say "TLS" not "SSL/TLS" and drop the primer in the TLS RELAYS
section.
OK benno
2023-09-24 08:28 tb
* share/mk/bsd.regress.mk: Make REGRESS_LOG more useful again
Enabling REGRESS_FAIL_EARLY made REGRESS_LOG error out at the
first error, which is pointless. So default to no if REGRESS_LOG
is set unless the user explicitly enabled it.
Requested by claudio ok bluhm
2023-09-15 07:13 tb
* share/mk/bsd.regress.mk: Default REGRESS_FAIL_EARLY to yes
The current fail open behavior may be desirable in some
circumstances, but it is an unexpected and dangerous default
since one expects some kind of feedback when running a test
suite. Currently failing tests are only visible on inspecting the
log, which led to unsuspecting people missing failures several
times in the past. Flip the default to fail closed. For those
that want to have the old behavior, it is easy enough to set the
variable to no.
Positive feedback job and schwarze ok kn
2023-09-03 10:18 nicm
* usr.sbin/httpd/server.c: Use EVBUFFER_DATA instead of reaching
into struct evbuffer. ok tb
2023-08-17 07:25 op
* usr.sbin/httpd/httpd.conf.5: use "example.com" instead of
"default" as server name in the various examples: it matches the
sample config and avoids tricking the user into thinking that
"default" as server name has a special meaning.
While here, document also that http uses the first server
matching the listening port when there's no match on the server
name. (was corrected on this by Crystal Kolipe, thanks)
ok kn on a previous version, improvements from sthen and jmc, ok
sthen
2023-07-12 12:46 tb
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Work around
use after free in httpd(8)
A malformed HTTP request can cause httpd in fastcgi mode to crash
due to a use-after-free. This is an awful hack, but it's good
enough until someone figures out the correct way of dealing with
server_close() here.
Reported by Jesper Wallin <jesper () ifconfig.se>
"this will do the trick for now" claudio ok beck deraadt
This is errata/7.2/029_httpd.patch.sig
2023-07-12 12:46 tb
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Work around
use after free in httpd(8)
A malformed HTTP request can cause httpd in fastcgi mode to crash
due to a use-after-free. This is an awful hack, but it's good
enough until someone figures out the correct way of dealing with
server_close() here.
Reported by Jesper Wallin <jesper () ifconfig.se>
"this will do the trick for now" claudio ok beck deraadt
2023-07-12 12:37 tb
* usr.sbin/httpd/: httpd.h, server.c, server_fcgi.c: Work around
use after free in httpd(8)
A malformed HTTP request can cause httpd in fastcgi mode to crash
due to a use-after-free. This is an awful hack, but it's good
enough until someone figures out the correct way of dealing with
server_close() here.
"this will do the trick for now" claudio ok beck deraadt
2023-03-08 04:43 guenther
* usr.sbin/httpd/control.c: Delete obsolete /* ARGSUSED */ lint
comments.
ok miod@ millert@
2023-02-15 20:44 tobhe
* usr.sbin/httpd/proc.c: proc_ispeer() is not used anywhere anymore
so remove it everywhere.
ok florian@ bluhm@ ok for vmd mlarkin@
2022-12-28 21:30 jmc
* usr.sbin/httpd/config.c: spelling fixes; from paul tagliamonte
any parts of his diff not taken are noted on tech
2022-12-27 17:10 jmc
* lib/libutil/fmt_scaled.c: spelling fixes; from paul tagliamonte
any changes not taken noted on tech, but chiefly here i did not
take the cancelation - cancellation changes;
2022-12-09 09:30 tb
* share/mk/bsd.regress.mk: Allow overriding default run-regress-*
targets
Overriding a default run-regress-* target with custom commands is
already possible and done by many tests. The fact that it
currently works depends on behavior in the BUGs section of
make.1, however. The fix is not to add commands if the target is
already defined with commands.
tested by anton correct fix from espie, ok anton
2022-10-24 15:02 jmc
* usr.sbin/httpd/: httpd.8, httpd.h: remove unused references to
httpd.sock; found by dante catalfamo ok florian
2022-09-21 05:55 yasuoka
* usr.sbin/httpd/server_http.c: Default request message body size
should be 0.
ok claudio
2022-09-02 07:38 benno
* usr.sbin/httpd/: httpd.c, httpd.conf.5: Make newer mime type
definitions take precedence over existing ones.
Patch from Ben Fuller <ben -AT- bvnf -DOT- space>, helped along
by florian@ ok florian@ and some mumblings from claudio who does
not want okays in httpd.
2022-09-01 20:36 tb
* usr.sbin/httpd/server_http.c: ugly whitespace
2022-08-28 11:11 jsg
* lib/libc/crypt/blowfish.c: remove unused blowfish inline defines
inline use was removed in 1998
2022-08-15 12:29 claudio
* usr.sbin/httpd/: httpd.h, server_fcgi.c: Neither clt_descreq nor
clt_descresp in struct client need to be void *. They both are
only used as struct http_descriptor. OK tb@
2022-08-15 10:29 claudio
* usr.sbin/httpd/server_fcgi.c: For FCGI_END_REQUEST reset the clt
struct similar to what is done in the file and other cases.
Especially when the session uses keep-alive it is important to
set TOREAD_HTTP_HEADER so that the state machine knows what's
next. OK op@
2022-08-15 09:40 op
* usr.sbin/httpd/server_file.c: plug some memory leaks in
server_file_index when failures occur
namelist and its entries are not freed if escape_html fails or if
we fail in the inner loop. Move scandir later so it's closer to
the for loop and handle escape_html and url_encode failures.
With lots of help from tb, thanks!
ok tb@
2022-08-15 09:36 op
* usr.sbin/httpd/server_http.c: plug a fd leak in read_errdoc if
fstat fails or if the file is empty
tweak/ok tb@
2022-08-12 08:40 claudio
* usr.sbin/httpd/server_fcgi.c: Use break instead of return so that
a HEAD request still consumes all data. OK op@
2022-08-12 06:41 op
* usr.sbin/httpd/server_fcgi.c: fix regression introduced in
previous commit. HEAD replies don't have a body so
server_fcgi_error shouldn't print the end marker.
OK claudio@
2022-08-11 14:25 op
* usr.sbin/httpd/server_fcgi.c: correctly handle an abnormal
fastcgi termination. httpd handles the disconnection from the
fastcgi application via server_file_error which assumes that the
reply was completey done. However, if the fastcgi reply wasn't
complete (e.g. because slowcgi hit the timeout) the HTTP client
are left "hanging" and waiting for a reply until they give up.
This adds a server_fcgi_error callback to handle the "no headers"
and "incomplete data" cases and properly close the reply before
falling back to server_file_error.
OK claudio@
2022-05-11 17:23 millert
* lib/libutil/util.h: Mark pw_error as __dead in prototype to match
the function definition. From Matthew Martin.
2022-05-04 18:57 deraadt
* lib/libc/gen/vis.c: Found two multiple evaluation macros. One of
them so long and scary it too many people to unravel correctly
and place into a static function. While here, move the flags
bits into local variables, which reduces the amount of () in the
checks. help from millert, miod, tedu
2022-04-20 14:00 millert
* lib/libutil/util.h: Make the termp and winp arguments for
openpty, et al. const. This matches the prototypes in glibc and
musl libc. From Matthew Martin. OK tb@
2022-03-31 17:27 naddy
* usr.bin/htpasswd/htpasswd.1: man pages: add missing commas
between subordinate and main clauses
jmc@ dislikes a comma before "then" in a conditional, so leave
those untouched.
ok jmc@
2022-03-11 09:04 dtucker
* lib/libutil/fmt_scaled.c: Revert previous commit. The problem it
was attempting to fix was already fixed by tb@ in rev 1.20.
Spotted by tb@
2022-03-11 07:29 dtucker
* lib/libutil/fmt_scaled.c: Check for underflow as well as overflow
when scaling negative numbers. ok millert@
2022-03-09 13:50 jsg
* usr.sbin/httpd/httpd.conf.5: bandwith -> bandwidth
2022-03-04 01:46 deraadt
* usr.sbin/httpd/server_file.c: Only provide the .gz file if
timestamp is >= the non-gzip file. Make sure it is a regular
file. Use the timestamp of the non-gzip file as the
last-modified timestamp, as proposed by claudio. ok claudio
bluhm millert
2022-03-02 23:27 deraadt
* usr.sbin/httpd/server_file.c: struct stat from early file
inspection was being used after actual file open() which means
the stat could refer to the wrong file. Mostly this relates to
st_size use. This bug could mean that httpd sends new files
truncated to the old length, saying "I am sure you have the
correct file now"? Could have other bad effects. ok tb millert
bluhm
2022-03-02 19:52 tb
* usr.sbin/httpd/server_file.c: Simplify .gz handling a bit
Combine strlcpy + strlcat into a single snprintf and remove a few
unnecessary parentheses.
ok deraadt millert
2022-03-02 11:10 florian
* usr.sbin/httpd/: httpd.c, httpd.h, server_fcgi.c, server_http.c:
Nothing uses kv_flags.
John (j AT bitminer.ca) pointed out that we didn't correctly
initialize struct kv and might use slower KV_FLAG_GLOBBING path
in kv_find depending on stack garbage. Instead of fixing the
initialization just delete kv_flags from struct kv.
OK claudio, tb
2022-02-27 20:30 bluhm
* usr.sbin/httpd/: httpd.conf.5, httpd.h, parse.y, server_file.c:
Add gzip-static option to httpd. This allows to deliver
precompressed files with content-encoding gzip. from prx at si3t
dot ch; OK tracey@
2022-02-18 10:24 jsg
* usr.sbin/httpd/patterns.7: prefer https links in man pages ok
gnezdo@ miod@ jmc@
2021-12-22 15:54 bluhm
* regress/usr.sbin/httpd/tests/: Client.pm, LICENSE, Makefile,
funcs.pl: Replace deprecated IO::Socket::INET6 with
IO::Socket::IP.
2021-12-04 06:52 florian
* usr.sbin/httpd/proc.c: Do not setup pipes between SERVER
processes, they don't talk to each other. Since this generates a
full mesh, the amount of filedescriptors needed grows
quadratically with the amount of configured prefork processes.
Might fix an out of filedescriptor bug that beck is seeing. OK
benno
2021-12-02 17:10 kn
* regress/usr.sbin/httpd/tests/Makefile: Tell testers which
packages to install right away (and why)
Other regress tests do it differently; just fix/thouch those
that did not mention any package name at all.
This helps grepping logs for SKIPPED to find instructions for the
next run.
2021-11-29 01:04 djm
* include/blf.h, lib/libc/crypt/blowfish.c: Niels agreed to remove
the advertising clause; switching these to 3-term BSD license.
2021-11-11 15:52 claudio
* usr.sbin/httpd/server_http.c: Move the assignment of http_query
down. Also do not assign a non-malloced string to it since the
code assumes it can call free on it. Fixes crashes noticed by
tobhe@ and florian@ OK otto@ tobhe@
2021-11-05 19:01 benno
* usr.sbin/httpd/server_http.c: Perform stricter checking on the
version string (which RFC 7230 says must be "HTTP" "/" DIGIT "."
DIGIT), and answer 505 version not supported when the number is
outside of what we support, and 400 bad request when the version
format is wrong. from Ross L Richardson, thanks! ok claudio@
2021-10-24 16:01 ian
* usr.sbin/httpd/: config.c, httpd.conf.5, httpd.h, parse.y,
server_http.c: Add httpd custom error page facility. Adapted by
me from https://github.com/mpfr/httpd-plus. Improvements from &
(earlier version) reads fine to tracey@; improvements & OK this
version benno@, florian@. Thanks.
2021-10-23 15:52 benno
* usr.sbin/httpd/server_fcgi.c: * stop sending the content for head
requests, even when its supplied by the fcgi. Required by RFC
7231 and RFC 3875 section 4.3.2. * If the client sends an empty
body without a Content-Lenght: do not add the Content-Lenght if
it's a HEAD request. If it's a HEAD request, the
Content-Lenght should show the size of the equivalent GET
request, but we don't know how much that will be so don't lie.
found by and fix suggested by Ross L Richardson, Thanks!
Additionally:
* when the fcgi supplies a Content-Length header, do not remove
it and set Transfer-Encoding: chunked. Instead, leave the
Content-Lenght header in place, as obviously the fcgi knows how
much data will come.
ok claudio@
2021-10-23 15:30 benno
* usr.sbin/httpd/server_http.c: annotate a 413 error with "request
body too large" in the error log. ok claudio@
2021-10-22 08:51 benno
* usr.sbin/httpd/server_http.c: return unsupported version for