<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/libexec, branch lockdoc-9.3-vfs</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>Pull up following revision(s) (requested by skrll in ticket #1469):</title>
<updated>2022-06-10T17:39:10+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2022-06-10T17:39:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=6275566403058b247fadd1a5a1adbb2abf08f362'/>
<id>6275566403058b247fadd1a5a1adbb2abf08f362</id>
<content type='text'>
	libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.49
	libexec/ld.elf_so/arch/hppa/rtld_start.S: revision 1.14

Set DP early so that any binary functions that override others get the
right value if they're called before _start.  This is true of bash where
it provides its own getenv.

Part of port-hppa/56118: sporadic app crashes in HPPA -current</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.49
	libexec/ld.elf_so/arch/hppa/rtld_start.S: revision 1.14

Set DP early so that any binary functions that override others get the
right value if they're called before _start.  This is true of bash where
it provides its own getenv.

Part of port-hppa/56118: sporadic app crashes in HPPA -current</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by kre in ticket #1455):</title>
<updated>2022-05-17T12:10:25+00:00</updated>
<author>
<name>bouyer</name>
<email>bouyer@NetBSD.org</email>
</author>
<published>2022-05-17T12:10:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=71e51462698570170a31d3c277788f19dad0ebec'/>
<id>71e51462698570170a31d3c277788f19dad0ebec</id>
<content type='text'>
	libexec/mail.local/mail.local.c: revision 1.29
fix local privilege escalation due to a race condition
NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).
mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).
An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.
Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).
Thanks to Jan Schaumann for bringing this to our attention.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/mail.local/mail.local.c: revision 1.29
fix local privilege escalation due to a race condition
NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).
mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).
An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.
Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).
Thanks to Jan Schaumann for bringing this to our attention.</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up the following (all via patch), requested by mrg in ticket #1221:</title>
<updated>2021-03-05T13:34:19+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2021-03-05T13:34:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=5ede40491766bdf8fb90a907f9bee7496adf3943'/>
<id>5ede40491766bdf8fb90a907f9bee7496adf3943</id>
<content type='text'>
	lib/lua/bozohttpd/Makefile			(apply patch)
	libexec/httpd/Makefile				1.30-1.31
	libexec/httpd/Makefile.boot			1.7-1.9
	libexec/httpd/auth-bozo.c			1.25-1.26
	libexec/httpd/bozohttpd.8			1.80-1.87
	libexec/httpd/bozohttpd.c			1.114-1.123,1.125-1.128
	libexec/httpd/bozohttpd.h			1.61-1.68
	libexec/httpd/cgi-bozo.c			1.49-1.53
	libexec/httpd/content-bozo.c			1.17-1.20
	libexec/httpd/daemon-bozo.c			1-.22
	libexec/httpd/dir-index-bozo.c			1.33-1.34
	libexec/httpd/main.c				1.23-1.27
	libexec/httpd/printenv.lua			1.4-1.5
	libexec/httpd/ssl-bozo.c			1.27-1.29
	libexec/httpd/libbozohttpd/libbozohttpd.3	1.5-1.6
	libexec/httpd/small/Makefile			1.4
	libexec/httpd/testsuite/Makefile		1.14
	libexec/httpd/testsuite/t16.in			1.1
	libexec/httpd/testsuite/t16.out			1.1
	libexec/httpd/testsuite/t17.in			1.1
	libexec/httpd/testsuite/t17.out			1.1
	libexec/httpd/testsuite/t18.in			1.1
	libexec/httpd/testsuite/t18.out			1.1


Update to bozohttpd 20210227.
Apply lua build fix (no blocklist support on this branch).

changes in bozohttpd 20210227:
	o  new support for content types: .tar.bz2, .tar.xz, .tar.lz,
	   .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma,
	   .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar.  should fix
	   netbsd PR#56026:
	   MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid

changes in bozohttpd 20210211:
	o  fix various NULL derefs from malformed headers.  mostly from
	   &lt;emily@ingalls.rocks&gt;.
	o  fix memory leaks in library interface: add bozo_cleanup().

changes in bozohttpd 20201014:
	o  also set -D_GNU_SOURCE in Makefile.boot.  from
	   hadrien.lacour@posteo.net.
	o  fix array size botch (assertion, not exploitable.)  from
	   martin@netbsd.org.
	o  also match %2F as well as %2f.  from leah@vuxu.org.
	o  many manual and help fixes.  clean ups for higher lint levels,
	   consistency/style clean ups.  various option fixes including made
	   -f imply -b.  from &lt;henrik@gulbra.net&gt; for freebsd.

changes in bozohttpd 20200912:
	o  add .m4a and .m4v file extensions.

changes in bozohttpd 20200820:
	o  make this work on sun2 by reducing mmap window there.
	o  fix SSL shutdown sequence.  from spz@netbsd.org.
	o  add readme support to directory indexing.  from jmcneill@netbsd.org
	o  add blocklist(8) support.  from jruoho@netbsd.org.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	lib/lua/bozohttpd/Makefile			(apply patch)
	libexec/httpd/Makefile				1.30-1.31
	libexec/httpd/Makefile.boot			1.7-1.9
	libexec/httpd/auth-bozo.c			1.25-1.26
	libexec/httpd/bozohttpd.8			1.80-1.87
	libexec/httpd/bozohttpd.c			1.114-1.123,1.125-1.128
	libexec/httpd/bozohttpd.h			1.61-1.68
	libexec/httpd/cgi-bozo.c			1.49-1.53
	libexec/httpd/content-bozo.c			1.17-1.20
	libexec/httpd/daemon-bozo.c			1-.22
	libexec/httpd/dir-index-bozo.c			1.33-1.34
	libexec/httpd/main.c				1.23-1.27
	libexec/httpd/printenv.lua			1.4-1.5
	libexec/httpd/ssl-bozo.c			1.27-1.29
	libexec/httpd/libbozohttpd/libbozohttpd.3	1.5-1.6
	libexec/httpd/small/Makefile			1.4
	libexec/httpd/testsuite/Makefile		1.14
	libexec/httpd/testsuite/t16.in			1.1
	libexec/httpd/testsuite/t16.out			1.1
	libexec/httpd/testsuite/t17.in			1.1
	libexec/httpd/testsuite/t17.out			1.1
	libexec/httpd/testsuite/t18.in			1.1
	libexec/httpd/testsuite/t18.out			1.1


Update to bozohttpd 20210227.
Apply lua build fix (no blocklist support on this branch).

changes in bozohttpd 20210227:
	o  new support for content types: .tar.bz2, .tar.xz, .tar.lz,
	   .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma,
	   .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar.  should fix
	   netbsd PR#56026:
	   MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid

changes in bozohttpd 20210211:
	o  fix various NULL derefs from malformed headers.  mostly from
	   &lt;emily@ingalls.rocks&gt;.
	o  fix memory leaks in library interface: add bozo_cleanup().

changes in bozohttpd 20201014:
	o  also set -D_GNU_SOURCE in Makefile.boot.  from
	   hadrien.lacour@posteo.net.
	o  fix array size botch (assertion, not exploitable.)  from
	   martin@netbsd.org.
	o  also match %2F as well as %2f.  from leah@vuxu.org.
	o  many manual and help fixes.  clean ups for higher lint levels,
	   consistency/style clean ups.  various option fixes including made
	   -f imply -b.  from &lt;henrik@gulbra.net&gt; for freebsd.

changes in bozohttpd 20200912:
	o  add .m4a and .m4v file extensions.

changes in bozohttpd 20200820:
	o  make this work on sun2 by reducing mmap window there.
	o  fix SSL shutdown sequence.  from spz@netbsd.org.
	o  add readme support to directory indexing.  from jmcneill@netbsd.org
	o  add blocklist(8) support.  from jruoho@netbsd.org.</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by hannken in ticket #1134):</title>
<updated>2020-11-19T11:25:18+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2020-11-19T11:25:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f87a0edadeeeb9ef3574ed2a2df0f41069d54c61'/>
<id>f87a0edadeeeb9ef3574ed2a2df0f41069d54c61</id>
<content type='text'>
	libexec/httpd/bozohttpd.c: revision 1.124

Bozohttpd clobbers files greater than 4GB on 32bit archs.
Make sure the alignment mask derived from pagesize is an off_t.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/httpd/bozohttpd.c: revision 1.124

Bozohttpd clobbers files greater than 4GB on 32bit archs.
Make sure the alignment mask derived from pagesize is an off_t.</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by chs in ticket #907):</title>
<updated>2020-05-13T18:08:38+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2020-05-13T18:08:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=3dd06bf8122445676da12c789c7d2b98b3f6eeb7'/>
<id>3dd06bf8122445676da12c789c7d2b98b3f6eeb7</id>
<content type='text'>
	libexec/ld.elf_so/rtld.c: revision 1.205
	libexec/ld.elf_so/rtld.h: revision 1.140
	libexec/ld.elf_so/symbols.map: revision 1.3
	libexec/ld.elf_so/symbols.map: revision 1.4
	lib/libc/gen/pthread_atfork.c: revision 1.13
	lib/libc/gen/pthread_atfork.c: revision 1.14
	libexec/ld.elf_so/rtld.h: revision 1.139
	libexec/ld.elf_so/rtld.c: revision 1.204

Introduce intermediate locking for fork, so that the dynamic linker is
in a consistent state. This most importantly avoids races between dlopen
and friends and fork, potentially resulting in dead locks in the child
when it itself tries to acquire locks.

Rename __atomic_fork to __locked_fork and give it &amp;errno as argument.
rtld and libc use different storage, so the initial version would
incorrectly report the failure reason for fork().

There is still a small race condition inside ld.elf_so as it doesn't use
thread-safe errno internally, but that's a more contained internal
issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/rtld.c: revision 1.205
	libexec/ld.elf_so/rtld.h: revision 1.140
	libexec/ld.elf_so/symbols.map: revision 1.3
	libexec/ld.elf_so/symbols.map: revision 1.4
	lib/libc/gen/pthread_atfork.c: revision 1.13
	lib/libc/gen/pthread_atfork.c: revision 1.14
	libexec/ld.elf_so/rtld.h: revision 1.139
	libexec/ld.elf_so/rtld.c: revision 1.204

Introduce intermediate locking for fork, so that the dynamic linker is
in a consistent state. This most importantly avoids races between dlopen
and friends and fork, potentially resulting in dead locks in the child
when it itself tries to acquire locks.

Rename __atomic_fork to __locked_fork and give it &amp;errno as argument.
rtld and libc use different storage, so the initial version would
incorrectly report the failure reason for fork().

There is still a small race condition inside ld.elf_so as it doesn't use
thread-safe errno internally, but that's a more contained internal
issue.</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by thorpej in ticket #758):</title>
<updated>2020-03-08T10:22:29+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2020-03-08T10:22:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=0c8a29c9016415a08c8f2c8a46efa6082daf1ed1'/>
<id>0c8a29c9016415a08c8f2c8a46efa6082daf1ed1</id>
<content type='text'>
	libexec/ld.elf_so/map_object.c: revision 1.61
	libexec/ld.elf_so/headers.c: revision 1.68
	libexec/ld.elf_so/rtld.c: revision 1.203

PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends
on a linker common page size boundary.  However, if the common page size
used by the linker is less than the VM page size being used by the kernel,
this can end up in the middle of a VM page and when the region is write-
protected, this can cause objects in neighboring .data to get incorrectly
write-protected, resulting in a crash.

Avoid this situation by calculating the end of the RELRO region not by
rounding memsz up to the VM page size, but rather by adding vaddr + memsz
and then truncating to the VM page size.

Fixes PR toolchain/55043.

XXX pullup-9</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/map_object.c: revision 1.61
	libexec/ld.elf_so/headers.c: revision 1.68
	libexec/ld.elf_so/rtld.c: revision 1.203

PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends
on a linker common page size boundary.  However, if the common page size
used by the linker is less than the VM page size being used by the kernel,
this can end up in the middle of a VM page and when the region is write-
protected, this can cause objects in neighboring .data to get incorrectly
write-protected, resulting in a crash.

Avoid this situation by calculating the end of the RELRO region not by
rounding memsz up to the VM page size, but rather by adding vaddr + memsz
and then truncating to the VM page size.

Fixes PR toolchain/55043.

XXX pullup-9</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by uwe in ticket #535):</title>
<updated>2019-12-09T16:14:10+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2019-12-09T16:14:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e5628491ec591c8a805cbb4a36f81102be09554a'/>
<id>e5628491ec591c8a805cbb4a36f81102be09554a</id>
<content type='text'>
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.60
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.59

Resolve ADDR16_LO, ADDR16_HI, and ADDR16_HA relocs.

Recent GNU ld does not resolve them statically if the reloc is in a
writable section and the symbol is not already referenced from text.

Use existing lo() and hi() macros.  Same object code is generated.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.60
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.59

Resolve ADDR16_LO, ADDR16_HI, and ADDR16_HA relocs.

Recent GNU ld does not resolve them statically if the reloc is in a
writable section and the symbol is not already referenced from text.

Use existing lo() and hi() macros.  Same object code is generated.</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by uwe in ticket #534):</title>
<updated>2019-12-09T16:12:16+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2019-12-09T16:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=3d17a8c56a756d5dd5624ca34299107c9bbb7e54'/>
<id>3d17a8c56a756d5dd5624ca34299107c9bbb7e54</id>
<content type='text'>
	libexec/ld.elf_so/rtld.c: revision 1.201

_rtld_relro - fix debug printf format for a size_t argument</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/rtld.c: revision 1.201

_rtld_relro - fix debug printf format for a size_t argument</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by nakayama in ticket #469):</title>
<updated>2019-11-26T08:12:26+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2019-11-26T08:12:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=59dc6b8211b1d80365e6f08d9e5819cced70ebf0'/>
<id>59dc6b8211b1d80365e6f08d9e5819cced70ebf0</id>
<content type='text'>
	lib/libc/tls/tls.c: revision 1.10
	lib/libc/tls/tls.c: revision 1.11
	lib/libc/tls/tls.c: revision 1.12
	lib/libc/tls/tls.c: revision 1.13
	libexec/ld.elf_so/tls.c: revision 1.13
	libexec/ld.elf_so/tls.c: revision 1.14
	libexec/ld.elf_so/Makefile: revision 1.142
	lib/libc/tls/Makefile.inc: revision 1.3
	usr.bin/ldd/Makefile.elf: revision 1.6

PR 54093: Align static TLS area to max_align_t.
Use alignof and not size_t for platforms with non-natural base
alignments.

Mirror the ld.elf_so logic for handling aligning the TLS size.
Most noticable, recompute the start of the TLS area for variant I
relative to the TCB. This makes a difference when the segment size and
base alignment don't agree.

Fix PR/54074 and PR/54093 completely.
More similar to the ld.elf_so logic, it is necessary to align with
p_align first.  Also, invert the #ifdef condition for consistency.

Should fix regression for static linking binaries:
http://releng.netbsd.org/b5reports/sparc/commits-2019.11.html#2019.11.10.23.39.03
http://releng.netbsd.org/b5reports/sparc64/commits-2019.11.html#2019.11.16.04.10.33</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	lib/libc/tls/tls.c: revision 1.10
	lib/libc/tls/tls.c: revision 1.11
	lib/libc/tls/tls.c: revision 1.12
	lib/libc/tls/tls.c: revision 1.13
	libexec/ld.elf_so/tls.c: revision 1.13
	libexec/ld.elf_so/tls.c: revision 1.14
	libexec/ld.elf_so/Makefile: revision 1.142
	lib/libc/tls/Makefile.inc: revision 1.3
	usr.bin/ldd/Makefile.elf: revision 1.6

PR 54093: Align static TLS area to max_align_t.
Use alignof and not size_t for platforms with non-natural base
alignments.

Mirror the ld.elf_so logic for handling aligning the TLS size.
Most noticable, recompute the start of the TLS area for variant I
relative to the TCB. This makes a difference when the segment size and
base alignment don't agree.

Fix PR/54074 and PR/54093 completely.
More similar to the ld.elf_so logic, it is necessary to align with
p_align first.  Also, invert the #ifdef condition for consistency.

Should fix regression for static linking binaries:
http://releng.netbsd.org/b5reports/sparc/commits-2019.11.html#2019.11.10.23.39.03
http://releng.netbsd.org/b5reports/sparc64/commits-2019.11.html#2019.11.16.04.10.33</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by kamil in ticket #209):</title>
<updated>2019-09-18T16:09:07+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2019-09-18T16:09:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=dde1d21d2dfda83f912babab7be177a62a556bae'/>
<id>dde1d21d2dfda83f912babab7be177a62a556bae</id>
<content type='text'>
	libexec/ld.elf_so/rtld.c: revision 1.198

Return the ELF loader dl_phdr_info information for dl_iterate_phdr(3)
Sync the behavior of dl_iterate_phdr(3) with Linux/FreeBSD/OpenBSD.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	libexec/ld.elf_so/rtld.c: revision 1.198

Return the ELF loader dl_phdr_info information for dl_iterate_phdr(3)
Sync the behavior of dl_iterate_phdr(3) with Linux/FreeBSD/OpenBSD.</pre>
</div>
</content>
</entry>
</feed>
