microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform
MIT License
2.82k stars 199 forks source link

Fix resolution of sibling .NET DLLs #3325

Closed Porges closed 1 year ago

Porges commented 1 year ago

When LibFuzzerDotNetLoader loads DLLs that have dependencies, they are not currently resolved correctly, as sibling DLLs in the same directory are not considered. In order to do this, we need to provide a custom AssemblyLoadContext. This PR does so, based on the dotnet core example code.

Validated with custom fuzzer implementation; we don't yet have a full test for this in check-pr.

Closes #3326.

codecov-commenter commented 1 year ago

Codecov Report

Merging #3325 (60cd586) into main (2ecca70) will decrease coverage by 1.41%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3325      +/-   ##
==========================================
- Coverage   31.80%   30.40%   -1.41%     
==========================================
  Files         307      133     -174     
  Lines       37334    14285   -23049     
==========================================
- Hits        11874     4343    -7531     
+ Misses      25460     9942   -15518     

see 174 files with indirect coverage changes