tls-1.2 - TLS 1.2 client and server support for 9legacy:
ECDHE (X25519 both sides; secp256r1 and secp384r1 on the
client), AEAD ciphers (AES-128-GCM, ChaCha20-Poly1305), SNI,
server-side ECDHE-RSA, X.509 chain + hostname + validity +
RFC 5280 Section 4.2 (basicConstraints, keyUsage,
extKeyUsage, nameConstraints) verification on by default via
/sys/lib/tls/ca.pem, RFC 5746 renegotiation_info server echo,
RFC 7627 extended_master_secret, per-vhost SNI cert routing
in ip/httpd, TLS 1.0 and 1.1 refused per RFC 8996. Scalar
multiplication selects each ladder step without branching on
the scalar. Session keys are zeroized at close, the record
sequence number is 64 bits so the AEAD nonce cannot repeat,
handshake messages are bounds-checked in both directions, and
the ASN.1 decoder limits its own recursion.
abaco-html4 - usability fixes for the 9legacy abaco(1) browser:
NOTES bug fixes (text selection, double-click), html(2) field
wiring, UTF-8 default charset, webfs cookie support,
failure-path error prefix, relative-BASE-href crash guard.
webfs-readline-overflow - fix a dormant Ibuf pointer-reset bug in
/sys/src/cmd/webfs/buf.c readline(); affects any webfs consumer driving
sustained parallel reads (observed in abaco loading modern HTTPS pages).
hget-readline-overflow - the same bug in the copy of that function in
/sys/src/cmd/hget.c: readline() never rewinds rp/wp when the 4 KB
input buffer drains, so the next read deposits response data past the
end of it. hget places the pointers before the buffer rather than
after, so the overrun leaves the struct entirely and corrupts
unrelated static data instead of faulting in readline. Needs only a
response whose headers and body cycle the buffer past 4096 bytes.
mothra-fixups - character-set detection in mothra(1), the browser from
/sources/extra (not part of 9legacy; fetch it there first).
plrdhtml compared the http-equiv attribute with strcmp, so the usual
spelling Content-Type never matched and the page rendered as
Latin-1, and it never read <meta charset=...> at all, which is the
form most pages use now. Both forms are read, case-insensitively.
Also returns a value from pl_boxsize, which could fall off the end
of a function declared to return a Point.
libregexp-listsize-bump - bump LISTSIZE 10 -> 12 in libregexp/regcomp.h to
dodge an off-by-one in rregexec's thread-list overflow detection; the
OOB byte write corrupts heap memory adjacent to the regex engine's
stack. Affects any libregexp consumer with a large enough regex.
ndb-dns-empty-noerror - fix Plan 9 ndb/dns to return NOERROR (RCODE
0) for unsupported RR types instead of the non-RFC NOTIMP
response, with SOA in authority section when authoritative.
Required by modern public CAs (CAA gate per RFC 8659) for any
Plan 9 host running authoritative DNS for its own zone.
ndb-dns-redistrib-size - one UDP datagram with more than 1448 bytes of
DNS payload aborts the ndb/dns UDP server: redistrib() in
sys/src/cmd/ndb/dnudpserver.c copies every datagram into a
1500-byte buffer behind an assert, and nothing restarts the
server. The buffer is now sized like every other UDP buffer in
ndb/dns.
libc-canlock-wakeup - a canlock(2) that fails on a held Lock leaves an
extra wakeup in the lock's semaphore; the next lock() that has to
wait takes it and enters while the holder is still inside. A
program that calls canlock on a lock it holds, as ndb/dns does,
leaks one wakeup per call until mutual exclusion is gone. canlock
now takes back the one wakeup unlock can release on its behalf
and never releases one itself. The APE lock gets the same change.
ndb-dns-reload-stale - every time ndb/dns -s rereads its database it
keeps the old copy of each record in its own area as a cache entry
that is never freed, so each reload adds one more copy until the
server restarts, and a record removed from the database stays.
dnauthdb now deletes the copies the reload did not reread.
usb-serial-acm - serial ports for USB CDC ACM devices
(microcontroller boards, modems, firmware consoles), which
usb/serial did not recognise: a new acm.c gives one /dev/eiaU
port per ACM control interface, with line settings, DTR/RTS,
break and serial state as PSTN 1.2 defines them, and usbdb
starts it. Every usb/serial port now behaves as uart(3) on
open: the first open programs the line and raises DTR and RTS,
the last close drops them, and open holds the device lock.
Boards that also offer a drive (DAPLink) stay with usb/disk.
Tested with an nRF52840 Dongle (Zephyr) and a PL2303; FTDI
adapters are untested with the open/close change.
usb-serial-prolific-maxpkt - usb/serial set the maximum packet size
of a PL2303's bulk endpoints to 256, but a full-speed bulk
endpoint takes at most 64 bytes per packet (USB 2.0 Section
5.8.3). A write of 65 bytes or more went out as one packet the
chip could not take, and that write and every later one were
lost until the device was unplugged. The endpoints now keep the
packet size from their descriptors.
upas-pop3-stls-double-free - every STLS session on port 110 crashes
pop3. The 9legacy patch upas-certchain added freecertchain() after
tlsServer() in stlscmd, but tlsServer frees conn.cert, the chain's
first certificate, itself on success (pushtls(2)), so it is freed
twice and the allocator panics right after a good handshake,
before authentication. The call is removed: as in tlssrv and
smtpd, nothing is freed after a successful tlsServer. Port 995
(tlssrv) is not affected.
9-pcboot-e820-regs - 9load, 9loadusb, 9boot and 9bootpbs cleared
only BX and DI before the BIOS E820 call, which takes all of EBX
and EDI. A BIOS that reads the stale upper halves fails the
call, the memory map stays empty, and a 9k amd64 kernel, which
has no other source of memory size, panics in mmuinit. The
loaders now clear the full registers.
9k-jmk-conf-k10time - the 9k k10time kernel did not link: four
9legacy patches added a kernel file to the other k10
configurations and skipped k10time (physalloc, watermarks,
pager, mpacpi). The four entries are added where k10cpu has
them.
9k-jmk-l32p-8mib - 9k kernels larger than 4 MB reset at boot:
k10/l32p.s mapped only 4 MB at KZERO before paging, and a kernel
ending past it touches unmapped memory before it can print. It
now maps 8 MB, as the i386 kernel does. Needed by 9k-jmk-usb.
9k-jmk-usb - USB for the 9k amd64 kernel, which had none: the
9legacy #u device and UHCI, OHCI and EHCI drivers, and #Ι/kbin
for usb/kb, adapted to 9k's kernel interfaces (the README lists
every changed line); all six k10 configurations get them, with
usbd (and partfs in k10cpuf and k10f) in the boot image. Apply
9k-jmk-l32p-8mib too. Its EHCI driver carries the fixes of
9-portusbehci-reset and 9-portusbehci-route.
usb-usbd-hubdesc - usbd rejected USB hubs whose port count is a
multiple of 8 ("descr. too small"), losing every device behind
them: it sized PortPwrCtrlMask like DeviceRemovable, which has
an extra reserved bit (USB 2.0 table 11-13). The check uses the
sizes the specification gives, and the mask is read with its
own layout.
9-portusbehci-reset - every EHCI port reset waited 500 ms for the
controller to end it and printed "port N didn't reset"; the
controller never does (EHCI 1.0 Section 2.3.9). The reset is
now held 50 ms (USB 2.0 Section 7.1.7.5) and ended by software,
as UHCI's portreset does.
9-portusbehci-route - on a PC with two EHCI controllers, every port
of the second one ran at full speed: init set the Configure Flag
only on the first, so the other routed its ports to its UHCI or
OHCI companions (EHCI 1.0 Sections 2.3.8, 4.2). init is again
the Bell Labs code of 2011-04-23, which sets it on every
controller; *maxehci=1 still leaves extra controllers alone.
kaffe - restored Kaffe 0.9.2 Java 1.1.3 VM for 9legacy/386:
interpreter, JIT, native services, JNI 1.1 and kaffeh.
|