focal-security: thread 'main' panicked at 'attempted to zero-initialize type `libgit2_sys::git_diff_options`

Bug #1995868 reported by Paride Legovini
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rust-bat (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
David Fernandez Gonzalez

Bug Description

The 0.12.1-1ubuntu0.1 security upload caused a regression in Focal: the tool is not unusable from within git repositories. Reproducer:

1. `lxc launch ubuntu:focal paride-f` and jump in container
2. apt install bat
3. mkdir x; cd x; git init; touch a
4. batcat a

Relevant output

$ batcat a
thread 'main' panicked at 'attempted to zero-initialize type `libgit2_sys::git_diff_options`, which is invalid', /usr/share/cargo/registry/bat-0.12.1/debian/cargo_registry/git2-0.8.0/src/diff.rs:451:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This entry from d/changelog is likely the culprit:

  * debian/patches/downgrade-dep-version.patch: Relax git2
    and syntect version requirement.

Ubuntu >= Jammy releases are not affected.

Revision history for this message
Paride Legovini (paride) wrote :

There is an upstream bug on this issue:

  https://github.com/sharkdp/bat/issues/2317

but I'm not adding making Launchpad track it as this is actually specific to Ubuntu.

Changed in rust-bat (Ubuntu):
status: New → Invalid
status: Invalid → Fix Released
tags: added: regression-update
Changed in rust-bat (Ubuntu Focal):
assignee: nobody → David Fernandez Gonzalez (litios)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rust-bat - 0.12.1-1ubuntu0.2

---------------
rust-bat (0.12.1-1ubuntu0.2) focal-security; urgency=medium

  * SECURITY REGRESSION: no-change rebuild to include fix from
    git2. (LP: #1995868)

 -- David Fernandez Gonzalez <email address hidden> Tue, 08 Nov 2022 12:22:04 +0100

Changed in rust-bat (Ubuntu Focal):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.