Skip to content

fix(security): run makeFBIOformats without a shell; parse rvNuke prefs as data - #175

Merged
mcoliver merged 1 commit into
mainfrom
fix/package-fbio-shell
Oct 26, 2026
Merged

mcoliver merged 1 commit into
mainfrom
fix/package-fbio-shell

Conversation

@mcoliver

@mcoliver mcoliver commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Two findings from a Jules scan that held up on review.

PackageManager: system() with an unquoted path

When a package with an image-format plugin is installed, PackageManager ran makeFBIOformats <dir> through system(), with the directory appended unquoted.

  • On macOS the user's package directory is under ~/Library/Application Support/RV, so the space split the argument and the new plugin was never indexed.
  • A directory containing shell metacharacters would have run them.

It now uses QProcess::execute(program, {dir}), which involves no shell. The commented-out QProcess version that sat below it has been removed. The plugin's ofstream is now closed before the scan; before, it was still open and might not have been flushed.

rvNuke: eval() of ~/.nuke/rvprefs

saveToDisk writes str(dict), and updateFromDisk read it back with eval(). It now uses ast.literal_eval, which accepts the same format but won't run code. A damaged file is logged and ignored.

The exec in RvCommunicator.eval is left alone. That's the RV→Nuke sync protocol: RV sends Python for Nuke to run.

Rest of the scan

  • Not changed:
    • miniunz.c strcpy: the buffer is strlen(newdir) + 1, so the copy is safe.
    • String concatenation: qt515_to_mu.py is a code generator and glnames.py is a FreeType build tool, so neither runs inside UTV.
    • Missing tests and TODO tidying: no change in behaviour, so left for now.
  • Still to look at separately: the NDI readback TODO, setFilterLiveReviewEvents, and the PaintCommand pixel aspect ratio.

…s as data

PackageManager ran makeFBIOformats through system() with the install
directory appended unquoted. On macOS that directory is under
"~/Library/Application Support", so installing a package that ships an
image-format plugin split the path at the space and makeFBIOformats never
indexed it; a directory containing shell metacharacters would have run
them. Run it with QProcess::execute and an argument list instead, and close
the plugin file first so the scan sees all of it.

rvNuke read ~/.nuke/rvprefs back with eval(). The file is written with
str(dict), so ast.literal_eval reads it the same way without executing it,
and a damaged file is now logged and ignored rather than raising.

Both were flagged by an automated scan (Jules).

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver
mcoliver force-pushed the fix/package-fbio-shell branch from ee1de14 to c4f426f Compare October 26, 2026 20:09
@mcoliver
mcoliver merged commit c4f426f into main Oct 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant