[MIR] libinih

Bug #1883890 reported by Sebastien Bacher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libinih (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

* Availability

Built for all supported architectures. In sync with Debian.
https://launchpad.net/ubuntu/+source/libinih/48-1

* Rationale

It's a depends from gamemode which currently bundles a copy version

* Security

No known security issues

https://security-tracker.debian.org/tracker/source-package/libinih
https://launchpad.net/ubuntu/+source/libinih/+cve
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=libinih

* Quality assurance

- The desktop-packages team is subscribed
- No report downstream, one upstream only and it's from today
https://bugs.launchpad.net/ubuntu/+source/libinih
https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=libinih
https://github.com/benhoyt/inih/issues

The unittests are run as an autopkgtest
http://autopkgtest.ubuntu.com/packages/libi/libinih

* Dependencies

It Depends only on libc6

* Standards compliance

Use current Standards-Version and dh13

* Maintenance

The Debian maintainer is active, the package is in sync, the Desktop Team is subscribed in Ubuntu

Changed in libinih (Ubuntu):
assignee: nobody → Seth Arnold (seth-arnold)
Revision history for this message
Seth Arnold (seth-arnold) wrote :

[Summary]
This does need a security review, so I'll assign ubuntu-security

Notes/TODOs:
Can someone please tell me how to check the Built-Using information?
Can someone please suggest to me the list of binaries to promote?

[Duplication]
There are many packages in the archive to read ini files. Only
libini-config5 is in C/C++ and in main. The documentation for the
container interface is several times larger than the libinih codebase:
it's a different scale of tool entirely. I'm satisfied this is a suitable
choice to promote to main.

[Dependencies]
OK:
- no other Dependencies to MIR due to this

Problems:
- no -dev/-debug/-doc packages that need exclusion
  there's another C++ version included in this package, libinireader0,
  that might be worth excluding if it is not specifically needed

[Embedded sources and static linking]
OK:
- no embedded source present
- no static linking

[Security]
OK:
- history of CVEs does not look concerning
- does not run a daemon as root
- does not use webkit1,2
- does not use lib*v8 directly
- does not open a port
- does not process arbitrary web content
- does not use centralized online accounts
- does not integrate arbitrary javascript into the desktop
- does not deal with system authentication (e.g. pam), etc

Problems:
- Parses a data format, ini files

[Common blockers]
OK:
- does not FTBFS currently
- no translation present, but none needed for this case (user visible)?
- does have a test suite that runs at build time
- does have a test suite that runs as autopkgtest
- not a python package, no extra constraints to consider int hat regard
- no new python2 dependency

Problems:

[Packaging red flags]
OK:
- Ubuntu does not carry a delta
- symbols tracking is in place
- d/watch is present and looks ok
- Upstream update history is good
- Debian/Ubuntu update history is good
- promoting this does not seem to cause issues for MOTUs that so far
  maintained the package
- no massive Lintian warnings
- d/rules is rather clean

Problems:
- the current release is not packaged
- not using Built-Using -- I odn't know how to find this

[Upstream red flags]
OK:
- no Errors/warnings during the build
- no incautious use of malloc/sprintf (as far as I can check it)
- no use of sudo, gksu, pkexec, or LD_LIBRARY_PATH
- no use of user nobody
- no use of setuid
- no important open bugs (crashers, etc) in Debian or Ubuntu
- no dependency on webkit, qtwebkit, seed or libgoa-*
- no embedded source copies
- not part of the UI for extra checks

Problems:

Changed in libinih (Ubuntu):
assignee: Seth Arnold (seth-arnold) → Ubuntu Security Team (ubuntu-security)
Revision history for this message
Seth Arnold (seth-arnold) wrote :

I reviewed libinih 50-1 as checked into hirsute. This shouldn't be
considered a full audit but rather a quick gauge of maintainability.

libinih is a simple ini file parser for C and C++.

- CVE History:
  - there's no cves in our database
- Build-Depends: debhelper-compat, meson
- pre/post inst/rm scripts?
  - None
- init scripts?
  - None
- systemd units?
  - None
- dbus services?
  - None
- setuid binaries?
  - None
- binaries in PATH?
  - None
- sudo fragments?
  - None
- polkit files?
  - None
- udev rules?
  - None
- unit tests / autopkgtests?
  - Small test suite appears to be run both during the build and during
    autopkgtest
- cron jobs?
  - None
- Build logs:
  - Clean build logs, lintian warnings are out of date:

 W: libinih source: debhelper-compat-file-is-missing
 W: libinih source: package-uses-deprecated-debhelper-compat-version 1
 E: libinih source: package-uses-debhelper-but-lacks-build-depends
 E: libinih source: missing-build-dependency debhelper
 W: libinih source: newer-standards-version 4.5.0 (current is 4.1.4)

- Processes spawned?
  - None
- Memory management?
  - Complicated by changing compile-time malloc vs stack into runtime; it
    seemed okay but it's C.
- File IO?
  - No file writing; file reading under control of the library user.
- Logging?
  - None
- Environment variable usage?
  - None
- Use of privileged functions?
  - None
- Use of cryptography / random number sources etc?
  - None
- Use of temp files?
  - None
- Use of networking?
  - None
- Use of WebKit?
  - None
- Use of PolicyKit?
  - None

- Any significant cppcheck results?
  - None
- Any significant Coverity results?
  - One small warning https://github.com/benhoyt/inih/issues/127
- Any significant shellcheck results?
  - None
- Any significant bandit results?
  - None

There's an error when a strncpy() was replaced with a memcpy(). Thankfully
there is already a fix upstream:

https://github.com/benhoyt/inih/commit/d7f465792c0c7686b50ed45c9a435394ae418d3e#diff-bf9ac2185bcd8a2bc7227af48d0b5da96acee30f6c6a7ba75173c84ce6f2e2c9

This may or may not really justify a CVE: usually ini files are supplied
by administrators or people who otherwise want the software to work.

In any event, I'd like our packages fixed before we promote this package
to main. So, security team PROVISIONAL ACK on promoting libinih to main,
conditional upon this being fixed in our packaging, either via a fresh
Debian import or patch.

Thanks

Changed in libinih (Ubuntu):
assignee: Ubuntu Security Team (ubuntu-security) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Seth, thanks for the review! I backported that fix to Ubuntu now
https://launchpad.net/ubuntu/+source/libinih/50-1ubuntu1
and contacted the Debian maintainer about getting an update there so we can sync again

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Let’s move the status to reflect the MIR ACK with latest fixes.

Changed in libinih (Ubuntu):
status: New → Fix Committed
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Override component to main
libinih 50-1 in hirsute: universe/misc -> main
libinih-dev 50-1 in hirsute amd64: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute arm64: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute armhf: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute i386: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute ppc64el: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute riscv64: universe/libdevel/optional/100% -> main
libinih-dev 50-1 in hirsute s390x: universe/libdevel/optional/100% -> main
libinih1 50-1 in hirsute amd64: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute arm64: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute armhf: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute i386: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute ppc64el: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute riscv64: universe/libs/optional/100% -> main
libinih1 50-1 in hirsute s390x: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute amd64: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute arm64: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute armhf: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute i386: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute ppc64el: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute riscv64: universe/libs/optional/100% -> main
libinireader0 50-1 in hirsute s390x: universe/libs/optional/100% -> main
Override [y|N]? y
22 publications overridden.

Changed in libinih (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

Override component to main
libinih 50-1ubuntu1 in hirsute: universe/misc -> main
libinih-dev 50-1ubuntu1 in hirsute amd64: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute arm64: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute armhf: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute i386: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute ppc64el: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute riscv64: universe/libdevel/optional/100% -> main
libinih-dev 50-1ubuntu1 in hirsute s390x: universe/libdevel/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute amd64: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute arm64: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute armhf: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute i386: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute ppc64el: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute riscv64: universe/libs/optional/100% -> main
libinih1 50-1ubuntu1 in hirsute s390x: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute amd64: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute arm64: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute armhf: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute i386: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute ppc64el: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute riscv64: universe/libs/optional/100% -> main
libinireader0 50-1ubuntu1 in hirsute s390x: universe/libs/optional/100% -> main
22 publications overridden.

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.