fs: Fix uninitialized 'offp' in statmount_string()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs: Fix uninitialized 'offp' in statmount_string()
In statmount_string(), most flags assign an output offset pointer (offp) which is later updated with the string offset. However, the STATMOUNT_MNT_UIDMAP and STATMOUNT_MNT_GIDMAP cases directly set the struct fields instead of using offp. This leaves offp uninitialized, leading to a possible uninitialized dereference when *offp is updated.
Fix it by assigning offp for UIDMAP and GIDMAP as well, keeping the code path consistent.
From the CVE record · Linux
In the Linux kernel, statmount_string() can leave an output offset pointer uninitialized when handling STATMOUNT_MNT_UIDMAP or STATMOUNT_MNT_GIDMAP. Updating that pointer may then cause an uninitialized pointer dereference. The input does not specify how an attacker could trigger this or whether access or user interaction is required.
Engineers running the Linux kernel should check whether their version contains the affected code; affected versions are not specified.