Commit Graph

14 Commits

Author SHA1 Message Date
Giacomo Tesio 0adf1b0431 new build: get rid of Go with few rc scripts. 2021-12-30 00:55:06 +01:00
Giacomo Tesio 16c7924425 libs: get rid of libstdio (and stdio.h); `mv ctype.h chartypes.h` in /sys/include 2020-09-17 23:53:35 +02:00
Giacomo Tesio 0a325039bf gcc & system build: add `-9` and remove `--posix` from build files 2020-09-17 23:53:12 +02:00
Giacomo Tesio f104c46858 purge syscall macros 2020-09-17 23:45:23 +02:00
Giacomo Tesio 9202b04504 rc: use some uppercase variables (PATH, USER...) 2017-10-22 13:22:37 +02:00
Giacomo Tesio e70feee4a3 libc: introduce "jehanne_" namespace
With this commit all functions declared in libc.h have been renamed
with the "jehanne_" prefix. This is done for several reason:

- it removes conflicts during symbol resolution when linking
  standard C libraries like newlib or musl
- it allows programs depending on a standard C library to directly
  link to a library depending on our non standard libc (eg libsec).

To ease transiction two files are provided:

- sys/include/lib9.h that can be included instead of <libc.h> to use
  the old names (via a simple set of macros)
- sys/src/lib/c/lib9.c that can be compiled with a program where the
  macro provided by lib9.h are too dumb (see for example rc or grep).

In the kernel port/lib.h has been modified accordingly and some of
the functions it directly provides has been renamed too (eg malloc
in qmalloc.c and print in devcons.c).
2017-04-19 23:48:21 +02:00
Giacomo Tesio aa25654232 libsec: improve fix #4: check valid length in TLS (msgRecv)
This commit should complete the work done at 90fe80e73b

Should also fix CID 155874.
2017-01-24 22:22:20 +01:00
Giacomo Tesio 90fe80e73b libsec: fix #4: Finished.n can only be 0, 12 or 36
As noted ty Cinap Lenrek Finished.n is only set by setVersion and can only
be either 0 before setVersion() as emalloc() zeros the TlsConnection struct
or SSL3FinishedLen/TLSFinishedLen after when we got the client/server hello.

Introducing FinishedLength enum we make the domain of the field explicit.
2017-01-18 00:24:10 +01:00
Giacomo Tesio 04962f0637 libsec: fix #3: out-of-bound access in aesXCBCmac (CID 155914) 2017-01-17 21:05:59 +01:00
Giacomo Tesio 663b002529 libsec: mark DigestState as stack var in ccpoly_*
CID 160099 and CID 160100 (#1 of 1): Free of address-of expression (BAD_FREE)
address_free: ccpolylen frees address of ds
2017-01-17 21:04:15 +01:00
Giacomo Tesio 3cfe366cc0 libsec: fix out of bound write (CID 155904)
In aesXCBCmac fix (potential) out of bound write in padding.

CID 155904 (#1 of 1): Out-of-bounds write (OVERRUN)
7. overrun-local: Overrunning array of 16 bytes at byte offset 16 by dereferencing pointer p2++.
2017-01-17 21:03:32 +01:00
Giacomo Tesio 41a9489dd4 libsec: fix des56to64 access to key array
CID 155910 (#1 of 1): Out-of-bounds access (OVERRUN)1.

overrun-buffer-val: Overrunning buffer pointed to by key of 7 bytes by passing it to a function which accesses it at byte offset 63.
2017-01-17 00:01:08 +01:00
Giacomo Tesio e93aafc028 qa: build everything with -Werror 2017-01-12 00:38:56 +01:00
Giacomo Tesio 38aca7a581 first usable version of kernel and commands
After an year of hard work, this is a first "usable" version of Jehanne.
2016-11-26 03:49:29 +01:00