Uploaded image for project: 'anaconda installer'
  1. anaconda installer
  2. INSTALLER-4544

Escaped quotes in kernel command-line break Anaconda

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • F45 - 100% CC
    • None
    • None

      There's a block of code in Anaconda that tries to account for a corrupted kernel command-line string by adding an extra double-quote: https://github.com/rhinstaller/anaconda/blob/7ae48f73b80e86d0f64b43f037785c22144cab2e/pyanaconda/core/kernel.py#L97-L99

      (left, middle, right) = cmdline.rpartition("BOOT_IMAGE=")
      if right.count('"') % 2:
      cmdline = left + middle + '"' + right

      This code doesn't account for escaped quotes, so e.g. if you add this to the kernel command-line:

      foo=bar\"baz

      The above code thinks there's an unbalanced number of quotes, inserts one, and causes shlex.split() to throw a "No closing quotation" ValueError.

      Reproducible: Always

      Steps to Reproduce:
      1. Load install media that runs Anaconda
      2. Edit the command-line in GRUB to add an argument containing an escaped double-quote
      3. Continue the boot
      Actual Results:
      Anaconda throws a ValueError very early in its startup

      Expected Results:
      Anaconda loads the GUI normally

              Unassigned Unassigned
              kkoukiou Katerina Koukiou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: