Commit d0fd1f5
committed
objtool: skip non-text sections when adding return-thunk sites
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090231
CVE: CVE-2022-23816
CVE: CVE-2022-23825
CVE: CVE-2022-29900
CVE: CVE-2022-29901
Upstream Status: RHEL only
The .discard.text section is added in order to reserve BRK, with a
temporary function just so it can give it a size. This adds a relocation to
the return thunk, which objtool will add to the .return_sites section.
Linking will then fail as there are references to the .discard.text
section.
Do not add instructions from non-text sections to the list of return thunk
calls, avoiding the reference to .discard.text.
Originally-from: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 343f3e3 commit d0fd1f5
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
| 1234 | + | |
| 1235 | + | |
1235 | 1236 | | |
1236 | 1237 | | |
1237 | 1238 | | |
| |||
0 commit comments