Commit graph

16 commits

Author SHA1 Message Date
Benoît Cortier
9f4e6d410b
fix(pdu): fix possible out of bound indexing in RFX module (#724)
An index bound check was missing in the RFX module. Found by fuzzer.
2025-03-27 12:00:20 -04:00
Marc-André Lureau
402ffd56c9 refactor(core): move Encode/Decode to core
ironrdp-pdu contains lots of code that we don’t actually need in other crates such as the virtual channels.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2024-08-30 00:05:16 -04:00
Norbert Szetei
8c4c640905
fix(cliprdr): OOM via decode_png and vector allocation (#411) 2024-03-12 00:34:28 +09:00
Norbert Szetei
ef2c3df761
fix(pdu): fixes three overflows in pointer.rs and one in bitmap.rs (#410) 2024-03-11 09:56:58 -04:00
Norbert Szetei
7e11d3e198
fix(pdu): overflow when decoding RsaPublicKey (#409) 2024-03-11 09:46:01 -04:00
Norbert Szetei
c4193371bd
fix(svc): rdpdr channel fuzzing harness and associated issues (#408) 2024-03-11 06:28:27 -04:00
Benoît Cortier
e92d8c3e17
test: regression test case for cliprdr_format target (#405) 2024-03-08 15:44:12 +00:00
Norbert Szetei
220df049b6
fix(cliprdr): inconsistent invariant for BitmapInfoHeader width/height methods (#407) 2024-03-08 15:36:17 +00:00
Vladyslav Nikonov
2b501496d9
feat: clipboard support for web client (#259) 2023-11-08 13:57:21 +02:00
Benoît CORTIER
c1802b625e test(graphics): save snapshots for RLE test
Instead of directly depending on the unmaintained rdp-rs to decompress
RLE tiles dynamically, a few snapshots are saved to test against.

The benefit is to remove a lot of outdated dependencies from our
(developement) dependency graph.
2023-10-05 10:58:16 -04:00
Vladyslav Nikonov
4c38be29c7
feat: PDUs for CLIPRDR channel (#170)
Issue: #107
2023-08-15 13:53:07 -04:00
Vladyslav Nikonov
1f401a1350
feat: pointer processing logic (#168)
FastPath pointer messages handling:

- Add pointer messages handling in `ironrdp-session`, `ironrdp-client` and `ironrdp-web`
  - Supported bpp's: 1, 16, 24, 32 (8bpp is not supported yet, palette messages handling
    should be added first)
  - Alpha blending is supported, and done via software-based compositing
  - Inverted cursor pixels are supported (FreeRDP do not support them correctly)
  - Large pointers are supported (FreeRDP crashes on them)
  - Cursor caching is supported
- Add new CLI argument to enable/disable pointer rendering (--no-server-pointer)
- `session`/`client` refactoring to facilitate multiple types of session output updates besides
  framebuffer update (e.g. request to hide/show system pointer on client)
- Minor changes in web client typescript code to hide/show cursor on canvas

Closes #108
2023-08-04 13:55:11 -04:00
Benoît CORTIER
a4a26d315e fix(pdu): panics in nego module found by fuzzing
Fixes #152
2023-06-15 15:08:05 -04:00
Benoît Cortier
f5a6ac7751
fix(pdu): panics in mcs module found by fuzzing (#137) 2023-05-16 23:40:07 +00:00
Benoît Cortier
0b20b56068
fix(pdu): panic in mcs module found by fuzzing (#133) 2023-05-16 16:19:22 +00:00
Benoît CORTIER
60bc72f873 test: organize integration tests into single crate
Put all integration tests in a single crate, and organized in modules.

This is similar to what was done in `cargo` repository:
https://github.com/rust-lang/cargo/pull/5022#issuecomment-364691154

```
$ rustup show
stable-x86_64-unknown-linux-gnu (default)
rustc 1.69.0 (84c898d65 2023-04-16)
```

Run on a recent high-end laptop:
12th Gen Intel(R) Core(TM) i9-12900HK

Original (multiple integration binaries):

- `cargo clean && cargo test --no-run`: 62.893s
- `cargo clean && cargo build --lib`: 54.959s
- `cargo clean && cargo build --bins`: 55.933s
- `cargo test --no-run` (after `cargo build`): 14.472s
- `cargo test` (after `cargo test --no-run`): 1.786s
- `du -hs target/`: 4.2G

After (ironrdp-testsuite):

- `cargo clean && cargo test --no-run`: 41.157s (crates with no tests are ignored)
- `cargo clean && cargo build --lib`: 53.983s
- `cargo clean && cargo build --bins`: 54.482s
- `cargo test --no-run` (after `cargo build`): 12.915s
- `cargo test` (after `cargo test --no-run`): 0.240s
- `du -hs target/`: 3.4G

Absolute diff:
- `cargo clean && cargo test --no-run`: -21.736s
- `cargo clean && cargo build --lib`: -0.976s
- `cargo clean && cargo build --bins`: -1.451s
- `cargo test --no-run` (after `cargo build`): -1.557s
- `cargo test` (after `cargo test --no-run`): -1.546s
- `du -hs target/`: -0.8G

Relative diff (%):
- `cargo clean && cargo test --no-run`: -34.5%
- `cargo clean && cargo build --lib`: -1.77%
- `cargo clean && cargo build --bins`: -2.59%
- `cargo test --no-run` (after `cargo build`): -10.7%
- `cargo test` (after `cargo test --no-run`): -86.5%
- `du -hs target/`: -19.0%
2023-05-11 19:41:11 -04:00