mirror of
https://sharelatex.tu-darmstadt.de/git/681e0e7a3a9c7c9c6b8bb298
synced 2025-12-08 05:27:59 +00:00
Update on Overleaf.
This commit is contained in:
@@ -205,7 +205,8 @@ The \gls{smdpp} client is primarily used by our \gls{isdr} application to execut
|
||||
\section{Fuzzing}
|
||||
\label{sec:fuzzing}
|
||||
|
||||
\todo{Section summary}
|
||||
The following section introduces the implementation of two core fuzzing components: \gls{apdu}-level fuzzing and structured data fuzzing. These components enable the systematic exploration of protocol edge cases and semantic inconsistencies in \gls{euicc} behavior.
|
||||
|
||||
|
||||
\subsection{APDU Fuzzing}
|
||||
\label{subsec:apdu_fuzzing}
|
||||
@@ -568,10 +569,9 @@ Specifically, we implemented fuzzing tests for the following functions:
|
||||
During the \texttt{setUpClass} phase, a PC/SC link is initialized, and the \gls{euicc} is prepared (\eg, by installing a test profile) to ensure the preconditions for each function are met. After executing the class's test suite, the \texttt{eUICCMemoryReset} function is called with all reset options enabled to restore a clean state. All leftover notifications are processed to leave the card in a consistent state for subsequent tests.
|
||||
|
||||
\paragraph{Error Classification.}
|
||||
According to the SGP.22 specification, many functions may return a generic \texttt{UndefinedError} in response to unexpected or malformed input. In our implementation, exceptions raised by the \gls{euicc} that map to well-defined error codes (i.e., subclasses of \texttt{EuiccException}) are not treated as test failures. These represent handled errors indicating that the input was invalid but the card responded appropriately.
|
||||
According to the SGP.22 specification, many functions may return a generic \texttt{UndefinedError} in response to unexpected or malformed input. In our implementation, when an \texttt{UndefinedError} is returned, we treat this as a potential indicator of an unhandled internal error or inconsistent implementation behavior. These cases are flagged for further investigation. Additionally, exceptions occurring outside the \gls{euicc}, such as Python \texttt{AssertionError}s or test harness failures, are treated as bugs in the testing infrastructure and are logged separately.
|
||||
\marginpar{Well-defined EuiccExceptions indicate valid error handling and are not treated as failures.}
|
||||
\todo{Check Undefined Error}
|
||||
By contrast, when an \texttt{UndefinedError} is returned, we treat this as a potential indicator of an unhandled internal error or inconsistent implementation behavior. These cases are flagged for further investigation. Additionally, exceptions occurring outside the \gls{euicc}, such as Python \texttt{AssertionError}s or test harness failures, are treated as bugs in the testing infrastructure and are logged separately.
|
||||
By contrast, exceptions raised by the \gls{euicc} that map to well-defined error codes (\ie, subclasses of \texttt{EuiccException}) are not treated as test failures. These represent handled errors indicating that the input was invalid but the card responded appropriately.
|
||||
|
||||
\paragraph{Conclusion.}
|
||||
By combining property-based data generation with structural knowledge of \gls{asn1} types, we extend the fuzzing coverage of the \gls{euicc} interface beyond what is possible with \gls{apdu} mutation alone. This enables the discovery of semantic inconsistencies and unhandled corner cases in \gls{euicc} implementations, especially when compared across different vendors during differential testing as shown in \cref{sec:data_fuzzing_evaluation}.
|
||||
@@ -607,9 +607,7 @@ By combining property-based data generation with structural knowledge of \gls{as
|
||||
While the implemented library provides a programmatic interface to the \gls{lpa} and \gls{euicc} operations, many users, especially testers and engineers, require a more accessible method for interacting with the system. For this reason, we provide a fully-featured \gls{cli} that exposes all major functionalities of the system, including \gls{apdu} tracing, \gls{lpa} operations, and fuzzing workflows.
|
||||
\marginpar{CLI offers user-friendly access to tracing, LPA operations, and fuzzing features.}
|
||||
|
||||
The \gls{cli} is built using Python’s standard \texttt{argparse} module for argument parsing, extended with \texttt{argcomplete} to enable shell auto-completion. For improved readability and formatting of terminal output, the \texttt{rich} library is used. This combination allows for an interactive, user-friendly \gls{cli} with both developer ergonomics and production readiness in mind.
|
||||
|
||||
The CLI structure is further detailed in \cref{sec:cli_structure}.
|
||||
The \gls{cli} is built using Python’s standard \texttt{argparse} module for argument parsing, extended with \texttt{argcomplete} to enable shell auto-completion. For improved readability and formatting of terminal output, the \texttt{rich} library is used. This combination allows for an interactive, user-friendly \gls{cli} with both developer ergonomics and production readiness in mind. The CLI structure is further detailed in \cref{sec:cli_structure}.
|
||||
|
||||
\paragraph{Integration with Pytest.}
|
||||
The data fuzzing component internally wraps \texttt{pytest}, leveraging the structure of Python test classes defined with the Hypothesis framework (cf. Section~\ref{subsec:data_fuzzing}). Each test class corresponds to a group of \gls{rsp} commands. By invoking the data fuzzing \gls{cli}, all available test classes are executed against the connected \gls{euicc}, with proper initialization and teardown logic handled automatically.
|
||||
|
||||
Reference in New Issue
Block a user