Commit graph

6521 commits

Author SHA1 Message Date
cinap_lenrek ba87e58876 wifi: learn target ip address from neighbor advertisements in dmat proxy 2018-01-12 18:28:50 +01:00
cinap_lenrek 2088f8c991 wifi: filter out loopback traffic from myself
broadcast traffic was received back on the wire causing
duplicate address detection to break with dmat proy as
the rewritten broadcasts where observable.

the fix is to just ignore packets from ourselfs received
from the air. devether already handles loopback.
2018-01-12 08:01:15 +01:00
cinap_lenrek d682a6cb38 ip/ipconfig: set on-link flag in router advertisement prefix info (fixes windows7) 2018-01-10 18:28:23 +01:00
cinap_lenrek 17ef60cbb8 merge 2018-01-08 00:24:55 +01:00
cinap_lenrek acb206859d ether8169: deal with kernel memory exhaution
when kernel memory is exhausted, rtl8169replenish() can fail
to plant more receive descriptors and rtl8169receive() would
run over the receive tail and crash on the nil ctlr->rb[x].

rtl8169receive() is called on "Receive Descriptor Unavailable"
and "Packet Underrun" so we will try to replenish descriptors
in the beginning first in case memory was exhausted and memory
is available again and make sure not to run over the tail.
2018-01-08 00:23:26 +01:00
cinap_lenrek 3be526d4b9 merge 2018-01-07 05:20:13 +01:00
cinap_lenrek 069230cd62 forgot to commit asn1dump.c... 2018-01-07 05:17:34 +01:00
23hiro 17291d91bb rconnect: support -t timeout for aan like in drawterm; also rcpu, rexport/import 2018-01-07 02:44:53 +01:00
cinap_lenrek 05f721e998 venti: fix wrong channel element size for amd64 (thanks mycroftiv) 2018-01-06 20:21:50 +01:00
cinap_lenrek 7776180407 tlssrv: remove usage reference to lost auth/secretpem 2018-01-06 08:44:12 +01:00
cinap_lenrek 1c3377a67f factotum: remove unused sshrsa.c 2018-01-06 08:37:32 +01:00
cinap_lenrek 8ff72ce20d libsec: remove asn1toDSApriv() 2018-01-06 08:34:25 +01:00
cinap_lenrek a200ecd3a6 remove asn12dsa, dsa2pub, dsa2ssh and dsagen
was mostly usefull for old ssh.
2018-01-06 08:32:51 +01:00
cinap_lenrek 91a701747c auth/asn1dump: include in mkfile 2018-01-06 07:44:12 +01:00
cinap_lenrek d4a830e2e1 tlsclient: allow dumping the server's certificate with new -d flag
usefull for debugging, like:

./8.tlsclient -d /fd/3 tcp!code.9front.org!https |[0=3] auth/asn1dump
2018-01-06 07:43:08 +01:00
cinap_lenrek e548a86575 tlsclient: remove X509dump() call, writes to fd 1 2018-01-06 06:25:45 +01:00
cinap_lenrek 7e4b669393 /sys/lib/dist: split 9boot into 9bootproto, make *.386.iso and *.amd64.iso targets 2018-01-05 08:41:46 +01:00
cinap_lenrek c197fede61 inst: determine kernel for bootsetup from $bootfile and $cputype 2018-01-05 08:38:23 +01:00
cinap_lenrek af06c6fa34 sysinfo: #c/swap -> #¶/swap 2018-01-05 02:43:28 +01:00
cinap_lenrek b437065950 stats: show amount of reclaimable pages (add -r flag)
reclaimable pages are user pages that are used for
caches like the image cache, mount cache and swap cache.
2018-01-05 00:52:14 +01:00
cinap_lenrek d3e54ff2d9 pc kernel: fix wrong simd exception mask (fixes go bootstrap) 2018-01-04 04:38:31 +01:00
cinap_lenrek 743f65c878 ape/libauth: remove auth_wep.$O from mkfile 2018-01-02 06:05:47 +01:00
cinap_lenrek e8b46f6972 ape: update auth.h header for APE 2018-01-02 04:59:44 +01:00
cinap_lenrek f70ebd8e62 factotum(4): document dp9ik, update protocol list 2018-01-02 04:50:13 +01:00
cinap_lenrek 77ad456b31 libauth: simplify _attrfmt() using fmtprint() avoiding stack buffer 2018-01-02 04:47:42 +01:00
cinap_lenrek e1ca49d625 libauth: remove auth_wep() function, and non-existing httpauth() declaration 2018-01-02 04:31:21 +01:00
cinap_lenrek 1d7bb80793 factotum: remove legacy wep protocol 2018-01-02 04:27:23 +01:00
cinap_lenrek 4edc761024 libauth: fix out of bounds memory access in _parseattr()
empty token would read ""[-1] accidentally in the AttrQuery case.
2018-01-01 23:23:55 +01:00
cinap_lenrek f7b0cc7a64 factotum: replace custom hex parsing code with dec16() avoding timing side channels 2018-01-01 21:14:39 +01:00
cinap_lenrek 5cf5f6e9ac libmp: use constant time encode(2) routines instead of lookup tables
the encode(2) routines are constant time now, so
use them instead of using lookup table that can
leak information through cache timing side channel.
2017-12-31 10:59:01 +01:00
cinap_lenrek ea212266a1 ape: make encXchr()/decXchr() functions available 2017-12-31 10:53:50 +01:00
cinap_lenrek c039b52fc3 libc: constant time implementation for encode(2) routines, fix base32
the string encoding functions touch secret key material
in a bunch of places (devtls, devcap), so make sure we do
not leak information by cache timing side channels, making
the encoding and decoding routines constant time.

we also expose the alphabets through encXchr()/decXchr()
functions so caller can find the end of a encoded string
before calling decode function (for libmp).

the base32 encoding was broken in several ways. inputs
lengths of len%5 == [2,3,4] had output truncated and
it was using non-standard alphabet. documenting the alphabet
change in the manpage.
2017-12-31 09:06:42 +01:00
cinap_lenrek ee89c82dd3 wifi: get rid of custom hextob() routine, use dec16(), avoid copies in parsekey() 2017-12-31 01:49:58 +01:00
cinap_lenrek 8a64413eca aux/wpa: get rid of custom Hfmt() routine, just use encodefmt. use %E for mac addresses 2017-12-31 01:04:41 +01:00
cinap_lenrek 57f8b6ec75 libsec: implement SPKI fingerprinting for okCertificate()
Instead of only using a hash over the whole certificate for
white/black-listing, now we can also use a hash over the
Subject Public Key Info (SPKI) field of the certificate which
contians the public key algorithm and the public key itself.

This allows certificates to be renewed independendtly of the
public key.

X509dump() now prints the public key thumbprint in addition
to the certificate thumbprint.

tlsclient will print the certificate when run with -D flag.

okCertificate() will print the public key thumbprint in its
error string when no match has been found.
2017-12-30 03:07:47 +01:00
cinap_lenrek b42d441a23 libsec: fix mistake: strnchr -> strchr 2017-12-30 02:47:02 +01:00
cinap_lenrek 582d2e664f libsec: avoid unneccesary memory copies and redundant code in x509
getting rid of some functions that take Byte* and instead
pass uchar* and length.

keeping the signature and public key fields in CertX509
as Bits* allows ownership transfer by swapping pointers.

use common code to copy CN from subject field.
2017-12-30 02:36:47 +01:00
cinap_lenrek e3cad82680 libsec: get rid of dummy data[1] in Bytes and Ints types (thanks pr) 2017-12-29 20:04:42 +01:00
cinap_lenrek ce2211b08c usbxhci: add missing pexit() in xhcirecover proc (thanks sam-d) 2017-12-29 06:10:25 +01:00
cinap_lenrek a021f054b0 wifi: revert rate adoption divider, breaks arpunks wifi 2017-12-29 03:41:32 +01:00
cinap_lenrek e313265eef /lib/bullshit: +converged 2017-12-29 01:58:47 +01:00
cinap_lenrek 8040a878de devtls, devssl: avoid ~0UL comparsion (from drawterm) 2017-12-28 19:13:53 +01:00
cinap_lenrek 80185daba9 devmnt: use u32int for tagmask, simplify alloctag() 2017-12-28 18:25:15 +01:00
cinap_lenrek b9d2a9efd5 wifi: don't implicitely update lastseen timestamp on nodelookup()
in case we continue to send traffic (like ping) with the ap gone,
the sending would keep updating bss->lastseen which prevents the
timeout to happen to switch bss.
2017-12-28 04:34:03 +01:00
cinap_lenrek d13142b3da etheriwl, etherwpi: limit transmit queue buffer bloat to 48k (at 22Mbit ≅ 20ms) 2017-12-28 01:24:38 +01:00
cinap_lenrek ce9cc8a358 wifi: don't assume Wifi.rates[] is sorted, return net data rate for mbps (50% theoretical) 2017-12-28 01:19:14 +01:00
cinap_lenrek 9c6897e848 arch(3): document #P/realmodemem file 2017-12-23 04:45:22 +01:00
cinap_lenrek 96eb90fba1 devvga: removing #v/vgabios, use /dev/realmodemem instead 2017-12-23 04:26:50 +01:00
cinap_lenrek 50bea0348c kernel: convert textmode cga screen contents to kmesg only once
screeninit() might be called again by devvga when switching
to textmode, so only convert the text framebuffer to kmesg
the first time.
2017-12-23 03:56:12 +01:00
cinap_lenrek 19419329b2 auth(8): auth/debug tests both dp9ik and p9sk1 2017-12-23 03:21:01 +01:00