diff --git a/browser/app/winlauncher/freestanding/DllBlocklist.cpp b/browser/app/winlauncher/freestanding/DllBlocklist.cpp index e5d6c9e38a65..5b09231f28ee 100644 --- a/browser/app/winlauncher/freestanding/DllBlocklist.cpp +++ b/browser/app/winlauncher/freestanding/DllBlocklist.cpp @@ -163,21 +163,16 @@ static BlockAction CheckBlockInfo(const DllBlockInfo* aInfo, uint64_t& aVersion) { aVersion = DllBlockInfo::ALL_VERSIONS; - if (aInfo->mFlags & - (DllBlockInfo::BLOCK_WIN8PLUS_ONLY | DllBlockInfo::BLOCK_WIN8_ONLY)) { + if (aInfo->mFlags & DllBlockInfo::BLOCK_WIN8_AND_OLDER) { RTL_OSVERSIONINFOW osv = {sizeof(osv)}; NTSTATUS ntStatus = ::RtlGetVersion(&osv); if (!NT_SUCCESS(ntStatus)) { return BlockAction::Error; } - if (osv.dwMajorVersion < 8) { - return BlockAction::Allow; - } - - if ((aInfo->mFlags & DllBlockInfo::BLOCK_WIN8_ONLY) && - (osv.dwMajorVersion > 8 || - (osv.dwMajorVersion == 8 && osv.dwMinorVersion > 0))) { + if ((aInfo->mFlags & DllBlockInfo::BLOCK_WIN8_AND_OLDER) && + (osv.dwMajorVersion > 6 || + (osv.dwMajorVersion == 6 && osv.dwMinorVersion > 2))) { return BlockAction::Allow; } } diff --git a/mozglue/dllservices/WindowsDllBlocklist.cpp b/mozglue/dllservices/WindowsDllBlocklist.cpp index 96ddbb74fb34..4fb158ae3ac3 100644 --- a/mozglue/dllservices/WindowsDllBlocklist.cpp +++ b/mozglue/dllservices/WindowsDllBlocklist.cpp @@ -463,13 +463,8 @@ static NTSTATUS NTAPI patched_LdrLoadDll(PWCHAR filePath, PULONG flags, "Ignoring the REDIRECT_TO_NOOP_ENTRYPOINT flag\n"); } - if ((info->mFlags & DllBlockInfo::BLOCK_WIN8PLUS_ONLY) && - !IsWin8OrLater()) { - goto continue_loading; - } - - if ((info->mFlags & DllBlockInfo::BLOCK_WIN8_ONLY) && - (!IsWin8OrLater() || IsWin8Point1OrLater())) { + if ((info->mFlags & DllBlockInfo::BLOCK_WIN8_AND_OLDER) && + IsWin8Point1OrLater()) { goto continue_loading; } diff --git a/mozglue/dllservices/WindowsDllBlocklistCommon.h b/mozglue/dllservices/WindowsDllBlocklistCommon.h index 0408604dd1b8..b1ea8aff4e5f 100644 --- a/mozglue/dllservices/WindowsDllBlocklistCommon.h +++ b/mozglue/dllservices/WindowsDllBlocklistCommon.h @@ -36,12 +36,11 @@ struct DllBlockInfoT { // only when we are a child process. enum Flags { FLAGS_DEFAULT = 0, - BLOCK_WIN8PLUS_ONLY = 1 << 0, - BLOCK_WIN8_ONLY = 1 << 1, - USE_TIMESTAMP = 1 << 2, - CHILD_PROCESSES_ONLY = 1 << 3, - BROWSER_PROCESS_ONLY = 1 << 4, - REDIRECT_TO_NOOP_ENTRYPOINT = 1 << 5, + BLOCK_WIN8_AND_OLDER = 1 << 0, + USE_TIMESTAMP = 1 << 1, + CHILD_PROCESSES_ONLY = 1 << 2, + BROWSER_PROCESS_ONLY = 1 << 3, + REDIRECT_TO_NOOP_ENTRYPOINT = 1 << 4, } mFlags; bool IsVersionBlocked(const uint64_t aOther) const { diff --git a/mozglue/dllservices/WindowsDllBlocklistDefs.in b/mozglue/dllservices/WindowsDllBlocklistDefs.in index 0db587bd47e8..2e7087cfb0d8 100644 --- a/mozglue/dllservices/WindowsDllBlocklistDefs.in +++ b/mozglue/dllservices/WindowsDllBlocklistDefs.in @@ -193,7 +193,8 @@ ALL_PROCESSES += [ DllBlocklistEntry("nahimicmsidevprops.dll", UNVERSIONED), # Bug 1268470 - crashes with Kaspersky Lab on Windows 8 - DllBlocklistEntry("klsihk64.dll", (14, 0, 456, 0xffff), BLOCK_WIN8_ONLY), + DllBlocklistEntry("klsihk64.dll", (14, 0, 456, 0xffff), + BLOCK_WIN8_AND_OLDER), # Bug 1579758, crashes with OpenSC nightly version 0.19.0.448 and lower DllBlocklistEntry("onepin-opensc-pkcs11.dll", (0, 19, 0, 448)), diff --git a/mozglue/dllservices/gen_dll_blocklist_defs.py b/mozglue/dllservices/gen_dll_blocklist_defs.py index d68f78a71ae0..13f30d05ddaa 100644 --- a/mozglue/dllservices/gen_dll_blocklist_defs.py +++ b/mozglue/dllservices/gen_dll_blocklist_defs.py @@ -55,8 +55,7 @@ DLL_BLOCKLIST_DEFINITIONS_BEGIN_NAMED(gBlockedInprocDlls) # These flag names should match the ones defined in WindowsDllBlocklistCommon.h FLAGS_DEFAULT = 'FLAGS_DEFAULT' -BLOCK_WIN8PLUS_ONLY = 'BLOCK_WIN8PLUS_ONLY' -BLOCK_WIN8_ONLY = 'BLOCK_WIN8_ONLY' +BLOCK_WIN8_AND_OLDER = 'BLOCK_WIN8_AND_OLDER' USE_TIMESTAMP = 'USE_TIMESTAMP' CHILD_PROCESSES_ONLY = 'CHILD_PROCESSES_ONLY' BROWSER_PROCESS_ONLY = 'BROWSER_PROCESS_ONLY' @@ -65,8 +64,7 @@ REDIRECT_TO_NOOP_ENTRYPOINT = 'REDIRECT_TO_NOOP_ENTRYPOINT' # Only these flags are available in the input script INPUT_ONLY_FLAGS = { - BLOCK_WIN8PLUS_ONLY, - BLOCK_WIN8_ONLY, + BLOCK_WIN8_AND_OLDER, }