Commit Graph

1141 Commits

Author SHA1 Message Date
Jean-Michel Picod
c1f2551d0d Bump Tock kernel version (#374)
* Bump Tock kernel version

* Update boards to new kernel

* Update patches to new kernel

* Update PR template

* Bump libtock-rs

* Use new layout from libtock-rs

* Fix clippy warnings due to updated toolchain

* Fix new toolchain file format

* Bump elf2tab to v0.7.0

* Fix worklow and setup.sh script to use the TOML rust-toolchain file

* New libtock-rs style of declaring the stack.

* Fix padding in layout file.

The layout from libtock-rs generates invalid flash padding.
The value is 32-bit and therefore setting padding to 0xff yields
0xff000000 instead of 0xffffffff that we want.

* adds tock patch for app break hard fault

* sets in deploy, removed patch 04-mpu-fix

* fixed the if deploy

* fixes indentation

* updates board names in install.md

* fix docs and deploy style

Co-authored-by: Fabian Kaczmarczyck <kaczmarczyck@google.com>
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-09-10 08:32:34 +02:00
David Drysdale
c2b3aeca88 cbor: don't allow infinite nesting by default
Change the read()/write() methods to use a nesting limit of 127
internally, to avoid the possibility of heavily nested inputs exhausting
the stack.

Library users that still want to skip nesting checks can still get at
this functionality by using `{read,write}_nested(..., None)`.
2021-09-09 07:03:27 +02:00
Julien Cretin
c6af7c0a2d Make sure the end offset doesn't overflow
We used to only check that the length was not too big but didn't check that the
starting offset wasn't too big. We want the end offset to not overflow.
2021-08-30 11:52:02 +02:00
Julien Cretin
7418196814 Specificy encoding when opening rust-toolchain file
This probably is just ASCII.
2021-08-30 11:41:14 +02:00
Julien Cretin
cbbb4b3e08 Reduce the store fuzzer input length 2021-08-30 11:41:14 +02:00
Julien Cretin
ed28941a6d Decrease maximum input size for store fuzzing
We currently have around 12% inputs timing out (was around 27% before the 100k
limit).
2021-08-13 22:15:50 +02:00
Julien Cretin
a80ff4279c Install Rust tools with stable compiler
We only need the frozen nightly for Tock (and maybe the app).
2021-08-13 15:31:10 +02:00
Julien Cretin
b5b9d3f6e0 Fix ctap2 fuzz targets to use prod cbor parsing
This fixes a left-over from #329.
2021-08-11 16:00:30 +02:00
Julien Cretin
659f8a16a2 Remove elf2tab dev-dependency
We don't use it anymore. Not sure when we used to use it.

Fixes #364
2021-08-10 11:43:58 +02:00
Julien Cretin
ec994eac32 Apply all patches in the patches directory 2021-08-09 13:55:55 +02:00
Julien Cretin
53da98c272 Add restore command 2021-08-09 13:55:55 +02:00
Julien Cretin
0f70a211ea Use bash, no rsync, add doc 2021-08-09 13:55:55 +02:00
Julien Cretin
7a812a657b fix reproduce scripts 2021-08-09 13:55:55 +02:00
Julien Cretin
d25f65c565 Add tool for applying/saving Tock patches 2021-08-09 13:55:55 +02:00
Julien Cretin
69f1b672f1 Fix all boards and move diff to directory 2021-08-07 11:29:07 +02:00
Julien Cretin
ad0605c2fa Make flash syscall interface async 2021-08-07 11:29:07 +02:00
Julien Cretin
3d4b652e12 Increase the max data len from 10k to 100k 2021-08-05 15:08:53 +02:00
Julien Cretin
445c1c6edd Explicitly limit the fuzzer input length
This is to avoid timeouts in oss-fuzz.
2021-08-05 15:08:53 +02:00
kaczmarczyck
b7a3e06cf4 ECDSA signatures and public keys in CTAP (#358)
* ECDSA signatures and public keys in CTAP

* adds one constant usage

* documents pub functions in ECDSA

* typo: involved

* extends wrong length test
2021-08-04 13:39:49 +02:00
Julien Cretin
7bb4960730 Output copy/paste table for store latency 2021-08-03 09:03:49 +02:00
Jean-Michel Picod
f5de994ad4 Fix coveralls workflow (#355) 2021-08-02 17:15:44 +02:00
Julien Cretin
58ae1ac8b1 Update store latency numbers (#354)
The main difference comes from c03605aa0c where we
started using -Oz instead of -O. A similar difference in latency is probably
expected in crypto and cbor too.
2021-08-02 16:15:52 +02:00
Julien Cretin
14115fbc79 Fix #348 (#351)
The dongle_dfu board should copy the dongle_opensk board and not the dongle
board. This issue was introduced by #334.
2021-08-02 09:52:25 +02:00
kaczmarczyck
a532959e8f Interface to syscalls to partition location types (#340)
* adds syscalls to use the partition location types

* no range implementation, helper file, refactorings

* more refactoring of syscall interface

* adds and refines trait

* improved documentation and partition_length function

* simplified ModRange

* cleanup

* new aligned_iter implementation
2021-07-20 10:37:57 +02:00
Fabian Kaczmarczyck
146b54e9d0 adds and links new security policy 2021-07-09 11:52:16 +02:00
Jean-Michel Picod
826c4f3021 Fix coveralls badge not pointing to the branch (#341) 2021-07-06 11:22:21 +02:00
Fabian Kaczmarczyck
eefc171076 adds a storage type for later usage 2021-07-05 13:13:14 +02:00
Jean-Michel Picod
46bbef2996 Coveralls (#339)
* Add code coverage report as part of the workflows

* Remove -Clink-dead-code which seems to be problematic

* Manually set features to avoid debug_* failing unit tests.

* Update badges

* Add libraries directory to trigger code coverage reporting.
2021-07-05 12:55:21 +02:00
David Drysdale
74d712da0d cbor: add local copy of LICENSE
Also bump crate version to 0.1.2 in preparation for release.
2021-06-29 10:01:29 +02:00
kaczmarczyck
ce0ee6c054 Kernel minimization (#334)
* adds patch to remove unused kernel components

* new boards, rebase patches to match

* rename boards for deployment
2021-06-28 14:55:20 +02:00
kaczmarczyck
5f20ba544b CBOR annotations for crates.io (#333)
* add default readme to fix crates.io

* badges in README
2021-06-25 15:14:14 +02:00
David Drysdale
0287a09573 cbor: allow user to control nesting (#329)
* cbor: allow user to control nesting

 - Make the default read/write entrypoints allow infinite nesting.
 - Add {read,write}_nested() entrypoints that allow the crate user to
   control the depth of nesting that's allowed.
 - Along the way, convert the write[_nested] variants to return a
   `Result<(), EncoderError>` rather than a bool.  This exposes
   more failure information (and forces the caller to take notice
   of those tailures), and allows use of the ? operator.

* fixup: transmute error

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-06-18 19:39:54 +02:00
Fabian Kaczmarczyck
dbce426e9f removes std from CBOR tests 2021-06-18 19:00:52 +02:00
Fabian Kaczmarczyck
9ca17b17e1 configuration changes to reduce binary size 2021-06-18 16:57:23 +02:00
David Drysdale
c7750a4e8c cbor: fix spelling of 'extraneous' 2021-06-17 12:31:10 +02:00
David Drysdale
1cee2414f4 fixup: more comparisons, re-order tests slightly 2021-06-17 10:33:36 +02:00
David Drysdale
fbe68b55cd cbor: support tagged values 2021-06-17 10:33:36 +02:00
David Drysdale
3aca5fbc74 cbor: prepare for publishing as standalone crate
- Add an example of usage
- Add a minimal README, including the example code
- Document public items
- Add more info to Cargo.toml
2021-06-16 17:16:05 +02:00
David Drysdale
7719078d46 cbor: rename crate to sk-cbor
In anticipation of publishing to crates.io, which already has a `cbor`
crate.
2021-06-16 17:16:05 +02:00
David Drysdale
f2812e4fe2 cbor: drop std feature, use core in tests (#327) 2021-06-16 15:40:18 +02:00
kaczmarczyck
77f6db6110 don't clone map keys (#325) 2021-06-15 08:46:04 +02:00
Jean-Michel Picod
fe0a9f208e Fix broken parsing. (#317) (#323)
* Fix broken parsing.

By setting the default value before pre-parsing we ensure that the item
can't be None. As an extra safety the custom action also checks for
None.

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-06-09 22:52:52 +02:00
kaczmarczyck
c86905f592 build.rs additions (#319) 2021-06-09 16:16:47 +02:00
Julien Cretin
d9e32ac103 Merge pull request #322 from ia0/fix_320
Stop using try_trait in persistent_store
2021-06-09 15:39:32 +02:00
Julien Cretin
6aa6a8acf0 Only build and test nightly
Prod is already built by opensk test.
2021-06-09 15:10:30 +02:00
Julien Cretin
67311e6c9f Fix typo 2021-06-09 13:55:53 +02:00
Julien Cretin
b3b652aa53 Stop using try_trait
It is too much instable.
2021-06-09 13:51:04 +02:00
Julien Cretin
bb4b94a141 Build persistent store with frozen compiler
But still make sure it passes tests with the most recent nightly.
2021-06-09 13:42:28 +02:00
Julien Cretin
67c4b3d158 Merge pull request #216 from ia0/usize_32_or_std
Make sure production store only builds with usize=u32
2021-04-26 13:29:47 +02:00
Julien Cretin
e32eb5358f Merge branch 'develop' into usize_32_or_std 2021-04-26 13:12:55 +02:00