Fix fuzz projects (#10416)
parent
028b2122ce
commit
b16033df03
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
dotnet build -c Release ../../Jellyfin.Api/Jellyfin.Api.csproj --output bin
|
||||
sharpfuzz bin/Jellyfin.Api.dll
|
||||
cp bin/Jellyfin.Api.dll .
|
||||
|
||||
dotnet build
|
||||
mkdir -p Findings
|
||||
AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 ./bin/Debug/net7.0/Jellyfin.Api.Fuzz "$1"
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
dotnet build -c Release ../../Jellyfin.Server/Jellyfin.Server.csproj --output bin
|
||||
sharpfuzz bin/jellyfin.dll
|
||||
cp bin/jellyfin.dll .
|
||||
|
||||
dotnet build
|
||||
mkdir -p Findings
|
||||
AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 -m 10240 dotnet bin/Debug/net6.0/Jellyfin.Server.Fuzz.dll "$1"
|
@ -0,0 +1,20 @@
|
||||
# Jellyfin fuzzing
|
||||
|
||||
## Setup
|
||||
|
||||
Install AFL++
|
||||
```sh
|
||||
git clone https://github.com/AFLplusplus/AFLplusplus
|
||||
cd AFLplusplus
|
||||
make all
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Install SharpFuzz.CommandLine global .NET tool
|
||||
```sh
|
||||
dotnet tool install --global SharpFuzz.CommandLine
|
||||
```
|
||||
|
||||
## Running
|
||||
Run the `fuzz.sh` in the directory corresponding to the project you want to fuzz.
|
||||
The script takes a parameter of which fuzz case you want to run.
|
@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Jellyfin.Api.Middleware;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Server.Tests
|
||||
namespace Jellyfin.Api.Middleware.Tests
|
||||
{
|
||||
public static class UrlDecodeQueryFeatureTests
|
||||
{
|
Loading…
Reference in new issue