Reject malformed DHCP subnet mask and router option lengths
before setup_adapter() consumes them.
This prevents attacker-controlled option lengths from expanding DHCP
option bytes into a fixed stack buffer while preserving valid
router address lists.
Validate the option lengths before use, keep router lists limited to
complete IPv4 addresses, and format registry IPv4 strings with
RtlIpv4AddressToStringA().
Booted amd64 QEMU image: no DHCP/client networking regression observed.
FsRtlCheckLockForReadAccess() accepts access through an exclusive
byte-range lock when the IRP key matches, even if another process
owns the lock. FsRtlFastUnlockAll() likewise removes exclusive locks
without checking the Process argument.
Require both the key and requestor process for exclusive-read access,
and skip exclusive locks owned by other processes in FsRtlFastUnlockAll().
This matches the ownership checks already used by
FsRtlFastCheckLockForRead() and FsRtlFastUnlockAllByKey().
Reference:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-_fsrtl_advanced_fcb_header-fsrtlfastchecklockforread
- Tweak the dimensions of the read-only editboxes.
- Tweak the Confirmation checkbox: adjust its dimensions, remove some
artificatial newlines, and adjust the wording in some translations.
- Support double-clicking on the Installation type page radio buttons.
The Installation type page offers two self-excluding options:
"Install ReactOS", and "Upgrade an existing ReactOS installation",
and no other controls are available (except for the wizard navigation
buttons). Thus, we can implement the UI feature of supporting double-
clicked radio buttons as an abbreviation for "select + Next".
For this, add the `BS_NOTIFY` style to both radio buttons, so as to
receive the `BN_DBLCLK` notification via the `WM_COMMAND` message.
Based on a suggestion by Raymond Chen,
https://devblogs.microsoft.com/oldnewthing/20050804-10/?p=34713
- Ensure the correct radio button is selected when activating the
Installation type page:
ensure the "Install ReactOS" radio button is checked if we don't have
a selected installation (default case), which can also happen if the
user clicked on the "Do not upgrade" button on the Upgrade/Repair
selection page, then went back.
- In the Upgrade/Repair selection page, go to the next page if the user
double-clicked on a listed installation.
- In the Drives/Partitions page:
* support pressing DELETE key to delete an existing partition;
* support pressing ENTER key to install ReactOS on a eligible
partition;
* enable the "Create" partition button only if the selected disk region
is not partitioned, and can be partitioned according to the disk's
partitioning scheme (e.g. for MBR disks, no more than 4 primary
partitions).
- Explicitly check for `BN_CLICKED` notification when handling
single-click on standard push-buttons.
- Return TRUE explicitly from `WM_COMMAND` in the _dialog_ procedures
when the message is handled and no extra default processing is needed.
- Reduce some extra indentation when possible.
llvm-mingw's static runtime (libc++, libmingwex, libc++abi, libunwind)
references symbols the NT 5.2 export surface does not provide. Add a
static library, linked into the Clang runtime chain below
DLL_EXPORT_VERSION 0x601, providing:
- C99 vsnprintf/snprintf on top of _vsnprintf/_vscprintf.
- __imp_* aliases binding dllimport references to the static CRT
definitions instead of ucrtbase import thunks, which collide with
them (lld: "<sym> was replaced").
- K32EnumProcessModules, forwarded to psapi's EnumProcessModules.
- The Win7 SRW lock and Vista condition variable surface, bound to the
RTL implementation linked statically from rtl_vista. Modules get one
self-contained, consistent synchronization implementation (ReactOS'
lock layout is not Windows-compatible), no kernel32_vista.dll
dependency, and stay runnable on any Windows version. Static SRW
linking suggested by Timo Kreuzer.
Address review feedback on the llvm-compat shims:
sync_static.c now uses the proper SDK/NDK headers with WINAPI/NTAPI, imp_alias.h
moved to sdk/include/reactos and fixes the msvcrtex slot decorations too, and a
new InitOnceExecuteOnce shim lets us drop libkernel32_vista from the interface.
Fix incorrect status code returned by VBESetPowerState()
in the VBE miniport driver.
- VBESetPowerState() returned `VBE_SUCCESS` (`0x4F`, raw VESA BIOS AL
success code) instead of `NO_ERROR` on success, so callers checking for
`NO_ERROR` would treat every successful DPMS power-state change
as a failure. Change it to `NO_ERROR`.
- Change annotations to SAL2 in the source and header.
- Allow exiting from "Network Connection Details" dialog
with Enter (using DEFPUSHBUTTON), Esc and Alt+F4 (using IDCANCEL)
- Add extended style LVS_EX_FULLROWSELECT to the listview, as in Windows
Misc. changes:
- Minor code rearrange, removing one obvious comment
- Czech (cs-CZ): Fix letter capitalization
- French (fr-FR): Fix accelerator key
- Hebrew (he-IL): Fix accelerator key
CORE-12323
- Implement 3-state checkbox for the use of large icons
- Add missing registry value write on applying a scheme
- Misc: Update preview on saving "Effects" settings (for flat menus)
CORE-12905
- Move `ExpandInstallerPath()` from userinit.c to livecd.c, and update
its SAL2 annotations and Doxygen comment.
- Make `StartInstaller()` directly use the cached ReactOS installer path.
- This avoids invoking yet again `ExpandInstallerPath()` when trying to
locate the installer also for the aim of determining whether to disable
the "Install" button.
Use the standard way of checking for the existence of
the `HKLM\SYSTEM\CurrentControlSet\Control\MiniNT` key.
Addendum to commits 8fabb29ed9 and 9fa8028ae4.
MmFreeContiguousMemory() is callable at up to DISPATCH_LEVEL,
but MiFreeContiguousMemory() used PAGED_CODE(), which incorrectly asserted
above APC_LEVEL in checked builds.
Replace it with an assertion that enforces the exported IRQL contract.
IopDereferenceVpbAndFree frees a zero-reference VPB only while it is still
installed in RealDevice->Vpb. This can leave the device with a dangling
VPB pointer while detached VPBs are retained.
Reverse the identity test so only a detached, nonpersistent VPB is released
after its reference count reaches zero.
Reference:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_vpb
MmUnloadSystemImage() had an explicit leak placeholder for driver images.
Implement the MmUnloadSystemImage() that performs matching teardown
for the image mappings, releasing the reserved system PTE range.
Also fix similar leak in MiLoadImageSection() by releasing image mappings
after load failures.
CORE-8294
Note that the driver images loaded at boot, which were not reloaded by
MiReloadBootLoadedDrivers(), remain at their loader-assigned addresses
and do not own system PTEs.
Remove a deprecated ERROR_FIND_SETUPDATA, which was supposed
to be removed in a7afba7703,
however it was skipped probably due to broken encoding.
Noticed in 7090cf7ebc / 7f7df51c62.
Since the database is downloaded lazily, clicking on "Update Database"
button won't re-download the online catalog if "Available apps" view is
not active. This patch forces the download even when the "Installed apps"
is active.
CORE-20205
Updating keyboard layout settings with user-overridden values, was
restricted to non-unattended setups, in an apparent attempt to fix
in commit 829b0c63d9 (r38146) the problem reported at CORE-3634.
This special-casing is now unnecessary.
For example, when installing ReactOS in French, this selects the French
keyboard layout as default, while keeping English installed but not
activated.
This is partly a "hack", and adapts the existing solution chosen in USETUP.
A better fix will be done in the future.
- Improve install abort on errors;
- Wait for the install thread to finish within the page that created it;
- Display the hourglass cursor while waiting for the thread.
- Ensure the wizard gets shown, centered on the screen, and focused,
when the Finish page is reached.
- Trigger the change of the "Cancel" wizard dialog button text, not
from the `WM_INITDIALOG` page handler, but from `PSN_SETACTIVE`.
- Add a `PSN_KILLACTIVE` handler to kill the timer initialized in
the `PSN_SETACTIVE` handler.
- Add a `PSN_WIZBACK` handler to disable going back in the wizard.
- Store the wizard page descriptors in a separate static array.
Then loop over these descriptors to create each page.
- Set the window small icon.
- Add a property sheet callback to set the window large icon (and not
a rescaled small icon!) from the `PSCB_INITIALIZED` notification.
Also, handle the `PSCB_PRECREATE` notification, and subclass the
property sheet window procedure, so as to be able to initially center
the wizard window while keeping it hidden before showing it,
independently of which wizard page is going to be initially shown.
A small hack for handling the `DM_REPOSITION` message is added,
because Wine's comctl32 propsheet.c doesn't send the message after
creating, initializing and resizing the property sheet dialog...
- drivepage.c:
* Move some local loop variables inside their loop block.
* Move the core of the Drives/Partitions dialog `PSN_WIZNEXT` handler
into a separate function.
- reactos.c:
* Move some `break;` into their corresponding `case` blocks.
* Replace remaining `EnableWindow(GetDlgItem(...), ...)` instances
with `EnableDlgItem(...)`.
* Introduce `hWndParent` variables in some routines, so as not to
invoke `GetParent(hwndDlg)` repeatedly.
* Use NULL for default "Error" message-box title.
* Remove an empty `case WM_DESTROY` in `FinishDlgProc()`.
- Use explicit Unicode property-sheet structures.
- Update the copyright notice dates. Fix the file header in drivepage.c.
Add the missing file header into reactos.rc.
- Fix TAB order in the Installation type page.
- Don't systematically set focus to the "Install ReactOS" radio-button.
Always resetting the focus to the "Install" choice is unwanted,
because, if the user instead selects "Upgrade", goes to the next
"Upgrade/Repair" page, then goes back to the installation type page,
the selection focus wouldn't be on what the user previously chose,
but would instead be on the "Install" choice, while the "Upgrade"
choice would stay checked, thus leading to an inconsistency.
We want instead the selection to stay as the user previously chose,
without changing it.
- Correctly handle item selection change in the Installations list,
so that only the "selected" state change is detected and UI buttons
are updated accordingly.
When the `PSN_QUERYINITIALFOCUS` notification is received (whenever
the page is made active), reselect the currently-selected item so as
to properly update the UI buttons.
- Add missing keyboard accelerators in the Devices selection page.
- Group all the push-buttons together in the Drives/Partitions page,
so that when the focus is on the first one and the user presses the
Left-arrow key, the focus stays on the buttons and doesn't go to the
partitions list.
- Remove the `PSN_QUERYINITIALFOCUS` hack in the Drives/Partition page
dialog procedure (see commit 6cb1394bb1, PR #9272).
- Correctly handle item selection change in the Drives/Partition list,
so that only the "selected" state change is detected and UI buttons
are updated accordingly.
When the `PSN_QUERYINITIALFOCUS` notification is received (whenever
the page is made active), reselect the currently-selected item so as
to properly update the UI buttons.
- Remove redundant `WS_VISIBLE` style for all the Edit-text fields of
the Summary page.
- In the Start/Welcome and the Finish/Abort pages: when disabling the
wizard "Back"/"Next" navigation buttons with `PropSheet_SetWizButtons()`,
for the purpose of hiding them next, do *NOT* use that macro, because
it posts the `PSM_SETWIZBUTTONS` message instead of sending it, and so,
it would be handled after hiding the buttons. The message would then
interfere with the hidden buttons (when both "Back" and "Next" are
hidden, "Next" gets forcefully shown).
- Set the default button to "No" for some confirmation dialogs
(setup abort; partition deletion; ...).
Import patch from wine-9.15: wine-mirror/wine@320547b
```
comctl32/tests: Add test for PSN_QUERYINITIALFOCUS for the propsheet.
wine commit id 320547b6757a7236929a0d47847cab0802607cde by Jacob Czekalla <[email protected]>
```