| Previous | Next |
| STATUS_INCOMPATIBLE_FILE_MAP | STATUS_EAS_NOT_SUPPORTED |
STATUS_SECTION_PROTECTION
View access exceeds or conflicts with section protection
The protection chosen when a section is created constrains every later view. A read-only section cannot provide a writable view, and executable or copy-on-write requests must be compatible with the mapping attributes. Image sections additionally derive effective protections from PE section characteristics rather than one uniform caller-selected mode.
Changing the requested MapView access flags without checking the original section can produce repeated failures. The fix is to create the mapping with the intended maximum protection and grant each consumer only the view access it actually requires.
What to inspect
- Capture the original section protection, allocation attributes, desired view access, and file-handle access rights.
- For image mappings, inspect executable, readable, writable, and shared characteristics on the affected PE section.
- Check whether a duplicated handle has fewer rights than the original section handle.
- Avoid PAGE_EXECUTE_READWRITE as a universal workaround because it weakens W^X and may still conflict with image semantics.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft: CreateFileMapping
- Microsoft: MapViewOfFile
- Microsoft: PE and COFF format
Looking for a different code? Search another status or error code.
