Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR contains the fix for issue #55 in a manner that still retains the original focus on the buffer overflow problem whilst also introducing an another concept security through obscurity and it's associated vulnerability.
Changes
All files have been modified, since the API was altered to hide the low implementation details from users. In this case the
user_account
structure. There are numerous comments in the source code informing the learner about the content. Thesolution.c
contains a detailed explanation why handing over raw structures to a user is a bad idea from a security standpoint.Nonetheless, if the only security measure is about hiding implementation facts, then an attacker can reverse engineer the code and exploit vulnerabilities. This is emphasized in this new version of the code base. In this way, it would be even more understandable for a learner why checking input is indispensable in security engineering.
P.S. The
hint.txt
has been split into two fileshint-1.txt
andhint-2.txt
each having one hint.Closes:
Task list