• Bug#1109923: sg3-utils: len variable gets clobbered in std_inq_decode r

    From Thomas Lamprecht@21:1/5 to All on Sat Jul 26 12:00:01 2025
    Package: sg3-utils
    Version: 1.48-2
    Severity: important

    Dear Maintainer,

    please consider backporting a [fix] for a regression [issue] introduced
    in sg3-utils 1.48.

    Basically, a variable tracking len in the function scope gets clobbered
    in various if scopes when encoding whitespace, thus cutting of
    information, and potentially having worse effects. Quoting parts of the upstream [issue] report:

    This change included a whole lot of refactoring (in part) to support
    json formatted output. If I'm understanding correctly, handling of
    inquiry response length was changed over to use an existing function
    local len variable. However, len was already being used in the
    --export output handling, so ends up getting clobbered when --export
    is used, resulting in missing information.

    After this change sg_inq --export <dev> no longer prints SCSI_MODEL, SCSI_MODEL_ENC, and SCSI_REVISION. This results in these udev
    properties being absent, so any rules matching on a model string will
    no longer function.

    This might be good to still make the Trixie release, while the [fix] has
    not received any comment upstream, it seems small and targeted.
    FWIW, we (Proxmox) will likealy prepare a downsttream package for this
    in any case.

    Thanks!
    Thomas

    [fix]: https://github.com/doug-gilbert/sg3_utils/pull/64/files
    [issue] https://github.com/doug-gilbert/sg3_utils/issues/63

    Versions of packages sg3-utils depends on:
    ii libc6 2.41-10
    ii libsgutils2-1.48 1.48-2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Hofstaedtler@21:1/5 to Thomas Lamprecht on Sat Aug 2 15:20:01 2025
    Control: affects -1 - release-notes

    On Sat, Jul 26, 2025 at 11:47:42AM +0200, Thomas Lamprecht wrote:
    After this change sg_inq --export <dev> no longer prints SCSI_MODEL, SCSI_MODEL_ENC, and SCSI_REVISION. This results in these udev
    properties being absent, so any rules matching on a model string will
    no longer function.

    release-notes now mention this here:
    https://www.debian.org/releases/trixie/release-notes/issues.en.html#udev-properties-from-sg3-utils-missing

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)