Azure Update Manager disregards FIPS repositories for Ubuntu 22.04

Aperta
#337 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python, ubuntu

Direzione di ricerca

Inizia da AptitudePackageManager.py:186 e dalla costruzione dell'elenco delle sorgenti di sicurezza, quindi segui install_security_updates_azgps_coordinated() alle righe 486-490 insieme al percorso di rilevamento di Ubuntu Pro. Riproduci o esamina il caso Ubuntu 22.04 FIPS descritto nell'issue; il lavoro è completato quando gli aggiornamenti FIPS di openssh rimangono disponibili durante l'installazione e non vengono selezionati pacchetti non FIPS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
Due to the filter in AptitudePackageManager, updates provided by the FIPS repo https://esm.ubuntu.com/fips-updates/ubuntu jammy-updates does not pass the filter and is dropped. If the Ubuntu Pro client is enabled, this problem is worse and will ultimately lead to non-FIPS packages being installed causing conflicts.

Azure Update Manager installs non-FIPS openssh-server on FIPS-enabled Ubuntu 22.04

Root Cause

The LinuxPatchExtension (v1.6.64) has two independent mechanisms for discovering
available updates:

  1. apt-get -s dist-upgrade (using a custom filtered source list)
  2. Ubuntu Pro Client API (via uaclient.api.u.pro.packages.updates.v1)

When building the security-classification source list, the extension filters each
deb line with a simple substring check:

AptitudePackageManager.py:186
if base_classification == Constants.PackageClassification.SECURITY and "security" not in line:
continue

The FIPS updates repo uses suite name "jammy-updates", not "jammy-security":

deb https://esm.ubuntu.com/fips-updates/ubuntu jammy-updates main

So it gets excluded from the security source list. Other ESM repos survive because
they have "-security" suites (jammy-apps-security, jammy-infra-security).

During DISCOVERY, the Pro Client independently finds the FIPS openssh packages
(classified as "standard-security") and they get merged into the combined package
list. The log shows them as "Pro Client only updates."

During INSTALLATION, the Pro Client is not involved. The extension calls:

AptitudePackageManager.py:486-490
install_security_updates_azgps_coordinated() ->
apt-get -y --only-upgrade true dist-upgrade

This rebuilds the same filtered security source list (without the FIPS repo).
apt resolves openssh-server from jammy-security instead, installing the non-FIPS
version.

Summary: discovery uses Pro Client (FIPS-aware), installation uses apt with a
filtered source list (not FIPS-aware). The two paths are not coordinated.

Lingua principale
Python
Stelle
12
Fork
20
Merge medio
3g 2h
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/LinuxPatchExtension

Tutte le issue di Azure/LinuxPatchExtension

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.