mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 21:39:05 +01:00
scripts: add PE Canary check to security-check
This commit is contained in:
@@ -146,6 +146,12 @@ def check_PE_control_flow(binary) -> bool:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_PE_Canary(binary) -> bool:
|
||||
'''
|
||||
Check for use of stack canary
|
||||
'''
|
||||
return binary.has_symbol('__stack_chk_fail')
|
||||
|
||||
def check_MACHO_NOUNDEFS(binary) -> bool:
|
||||
'''
|
||||
Check for no undefined references.
|
||||
@@ -203,6 +209,7 @@ BASE_PE = [
|
||||
('NX', check_NX),
|
||||
('RELOC_SECTION', check_PE_RELOC_SECTION),
|
||||
('CONTROL_FLOW', check_PE_control_flow),
|
||||
('Canary', check_PE_Canary),
|
||||
]
|
||||
|
||||
BASE_MACHO = [
|
||||
|
||||
Reference in New Issue
Block a user