Azure / Azure/LinuxPatchExtension

Azure Update Manager disregards FIPS repositories for Ubuntu 22.04

Ouverte
#337 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
12
Forks
20
Merge moyen
6 j 4 h
PR mergées (30 j)
1

Description

**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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par AptitudePackageManager.py:186 et la construction de la liste des sources de sécurité, puis suivez install_security_updates_azgps_coordinated() aux lignes 486-490 parallèlement au chemin de découverte d'Ubuntu Pro. Reproduisez ou examinez le cas Ubuntu 22.04 FIPS décrit dans l'issue ; le travail est terminé lorsque les mises à jour FIPS d'openssh restent disponibles pendant l'installation et qu'aucun paquet non-FIPS n'est sélectionné.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python, ubuntu
Domaine
devops, operating-systems
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.