Skip to content

Commit

Permalink
Issue #3 -- Drop SHF_WRITE flag from .plt attributes
Browse files Browse the repository at this point in the history
The table titled "special sections" displays the SHF_WRITE flag as being
set in the ".plt" section's attributes.  This looks like a documentation
bug that has been present since the original ABI.  The .plt doesn't need
to be writable, and it would pose a security risk if it were.

To my knowledge (verified with Ulrich Weigand and Andreas Krebbel),
existing tools never mark the .plt writable.

To fix the issue, just drop the SHF_WRITE flag from the ".plt" section's
attributes.
  • Loading branch information
aarnez committed Oct 13, 2022
1 parent fee6e0b commit 9bb099d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lzsabi.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4048,7 +4048,7 @@ \subsection{Special Sections}
\texttt{.got} & \texttt{SHT\_PROGBITS} &
\texttt{SHF\_ALLOC + SHF\_WRITE} \\
\texttt{.plt} & \texttt{SHT\_PROGBITS} &
\texttt{SHF\_ALLOC + SHF\_WRITE + SHF\_EXECINSTR} \\
\texttt{SHF\_ALLOC + SHF\_EXECINSTR} \\
\bottomrule
\end{tabular}
\end{DIFnomarkup}
Expand Down

0 comments on commit 9bb099d

Please sign in to comment.