summaryrefslogtreecommitdiff
path: root/libexec
AgeCommit message (Collapse)Author
2023-06-07add a note about how to setup http -> https redirection.mrg
bump documented version.
2023-06-07serve .iso as "application/octet-stream". bump version & copyright.mrg
2023-06-07TLS variant I archs need to fudge the offset by the size of the TCB.joerg
2023-06-04ld.elf_so: Sprinkle more debug messages on dlopen and error.riastradh
PR pkg/57445
2023-06-04Avoid using uninitialized variable "symnum" when building with DEBUGmartin
enabled by borrowing the rdbg_symname() macro from arch/x86_64.
2023-06-04Fix interactions of initial-exec TLS model and dlopenjoerg
(1) If an initial-exec relocation was used for a non-local symbol (i.e. the definition of the symbol is in a different DSO), the computation of the static TLS offset used the wrong DSO. This would effectively mean the wrong address was computed (PR toolchain/50277, PR pkg/57445). Fix this by forcing the computation of the correct DSO (the one defining the symbol). This code uses __UNCONST to avoid the vast interface changes for this special case. (2) If symbols from a DSO loaded via dlopen are used with both global-dynamic/local-dynamic and initial-exec relocations AND a initial-exec relocation was resolved first in a thread, a split brain situation could exist where the dynamic relocations would use one memory block (separate allocation) and the initial-exec relocations the static per-thread TLS space. (3) If the initial-exec relocation in (2) is seen after any thread has already used a GD/LD allocation, bail out. Since IE relocations are used only in the GOT, this will prevent the dlopen. This is a bit more aggressive than necessary, but a full blown reference counting doesn't seem to be justified.
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-06-03bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBERlukem
Provide a single variable CC_WNO_ADDRESS_OF_PACKED_MEMBER with options for both clang and gcc, to replace CLANG_NO_ADDR_OF_PACKED_MEMBER CC_NO_ADDR_OF_PACKED_MEMBER GCC_NO_ADDR_OF_PACKED_MEMBER Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-06-02follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.andvar
also s/beyound/beyond/ and few others along the way, mainly in comments.
2023-06-01ld.elf_so: Make tls alloc debug messages more detailed and greppable.riastradh
XXX pullup-10
2023-05-31ld.elf_so: Sprinkle tls debug messages.riastradh
XXX pullup-10
2023-05-09Deal with OpenSSL-3.xchristos
2023-05-09accommodate OpenSSL-3.xchristos
2023-05-07RISC-V support that works on QEMU with a single hart.skrll
Thanks for Simon Burge for plic(4).
2023-04-23dlopen(3): Read _rtld_objtail under the lock.riastradh
XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-04-18Oops wrong mask.christos
2023-04-18The SysV ABI specifies that the symbol hash function should return only 32christos
bits of hash. Unfortunately due to an implementation bu and the fact that the return type is unsigned long which is 64 bits in LP64, this can fail in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See: https://maskray.me/blog/2023-04-12-elf-hash-function From Ed Maste @ FreeBSD: https://cgit.freebsd.org/src/commit/\ ?id=29e3a06510823edbb91667d21f530d3ec778116d Need to write Unit Tests for this.
2023-04-09ld.elf_so powerpc: remove bogus ldscriptchs
This ldscript is not needed and actually makes things worse by putting everything in one LOAD section, which then needs to have rwx permission. Remove it so that we get two LOAD sections with better permissions. Fixes PR 57323.
2023-02-10Alignment. NFCI.skrll
2023-01-12fix the ldd buildchristos
2023-01-12Handle program headers properly; fixes c++ exceptions on arm32.christos
2023-01-06Remove the limitation of only being able to load binaries with 2 PT_LOADchristos
sections, like the kernel can. From FreeBSD.
2023-01-04comment out a function that is only used in rtldchristos
2023-01-04make the what argument size_t since we are passing in size_tchristos
2022-12-05Use the SZREG symbol instead of __SIZEOF_POINTER__ as its shorter. Assertskrll
that they're the same just in case. Sprinkle some KNF whitespace while I'm here.
2022-12-05RISC-V is RELAskrll
2022-12-04Consistently use the 'mv' instrucation (which is itself an alias) insteadskrll
of the (old) alternative alias 'move'.
2022-12-03Trailing whitespaceskrll
2022-12-03Whitespace. NFC.skrll
2022-11-02fix various typos in comments and messages.andvar
2022-11-01s/varaible/variable/ and s/varible/variable/ in comments.andvar
2022-09-13ld.elf_so(8): Make fork take a shared, not exclusive, lock.riastradh
We only need to ensure that there are no concurrent modifications to the rtld data structures in flight, since the threads that began those modifications will not exist in the child and will therefore be unable to complete them in the child. A shared lock suffices to ensure there are no such concurrent modifications in flight; an exclusive lock is not necessary, and can cause deadlock if fork is executed from a signal handler, which is explicitly allowed by POSIX (and our own sigaction(2) man page) which marks fork as async-signal-safe. PR lib/56979
2022-09-12Document the -q option.martin
2022-09-12Add a -q option to make http quiet (no log messages).martin
Usefull when running multiple instances and some for (high traffic) APIs e.g. to receive log data from appliences - it makes not sense to duplicate the whole log in the xferlog file (but we can't configure that at the syslog level due to other httpd instances using that).
2022-08-26Fix CVE-2020-10188hgutch
2022-08-26telnetd: fix the crash that's been talked about the past couple days.dholland
(Move initialization of the slc table earlier so it doesn't get accessed before that happens.) Calling the crash a DoS or security problem is a bit overwrought; it's just a bug.
2022-07-06Fix copy & pasto: DTPREL relocations do not need to allocate a staticmartin
TLS index. Patch from joerg@
2022-06-21Support ifunc on aarch64. The tests pass at least.skrll
2022-06-21Wrap long #if defined(...) || ... and sort. NFCI.skrll
2022-06-06build system: Revert all the recent additions of MK[...] knobs thatnia
allow conditionally disabling the building of certain user space programs in the 'base' set. There is not enough consensus that this is the right way and a few people had strong objections, see source-changes-d@.
2022-05-31fix various typos in comments, documentation and messages.andvar
2022-05-31add .mobi / application/x-mobipocket-ebook.mrg
2022-05-30Set DP early so that any binary functions that override others get theskrll
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
2022-05-28mk: Add MKFINGER, MKTALK flags for not buildingnia
talk, talkd, finger, fingerd.
2022-05-27mk: Add a MKLFS flag for excluding the log-structured filesystem userspacenia
tools from the build.
2022-05-18call this bozohttpd 20220517.mrg
2022-05-17fix local privilege escalation due to a race conditionkre
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.
2022-04-17fix various typos in comments.andvar
2022-04-10fix various typos in comments and output/log messages.andvar
2022-04-09rtld: Convert membar_exit/enter to membar_release/acquire.riastradh
These are basic CAS-based locking primitives needing release and acquire semantics, nothing fancy here -- except the membar_sync parts which are questionable but not relevant to the present audit.