rustsec / advisory-db

Security advisory database for Rust crates published through crates.io
https://rustsec.org
Other
922 stars 364 forks source link

Add vulnerability advisory for n2 #2131

Open lwz23 opened 2 weeks ago

lwz23 commented 2 weeks ago

Multiple soundness issues in n2.

n2 contains multiple soundness issues:

  1. Invalid Input Handling in Scanner::slice Method. When using the Scanner::slice method, passing an out-of-bounds argument causes the program to panic abort. This indicates a potential design flaw, as it fails to handle invalid input properly, impacting the stability of the application. Issue #121
  2. Out of Bounds Access in Scanner::peek Method. The peek method in the Scanner struct does not handle out-of-bounds accesses correctly. When the internal offset exceeds the length of the buffer, it causes a panic abort. Issue #122
  3. Invalid Input Handling in Scanner::peek_newline Method. The peek_newline method fails to handle cases where the internal offset exceeds the size of the buffer, leading to a panic abort. This indicates a design flaw as invalid input is not handled properly. Issue #123