[UBUNTU 20.04] zkey: Fix listing of keys on file systems reporting DT_UNKNOWN.

Bug #1859018 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Canonical Foundations Team
s390-tools (Ubuntu)
Fix Released
Undecided
Skipper Bug Screeners
Bionic
Invalid
Undecided
Unassigned
Eoan
Won't Fix
Undecided
Unassigned
Focal
Fix Released
Undecided
Skipper Bug Screeners

Bug Description

Description: zkey: Fix listing of keys on file systems reporting DT_UNKNOWN.
Symptom: When the zkey key repository is located in a file system that
               does not have full support for report the file type, such as
               XFS, the 'zkey list' command does not show any keys, although
               keys exist in the repository.
Problem: The zkey list function uses scandir() to look for files in the
               zkey key repository directory. It checks the dirent.d_type field
               to consider only regular files, but skips all others. File
               systems that do not have full support for returning the file
               type in d_type will return DT_UNKNOWN instead. zkey skips
               those directory entries and thus does not show any keys.
Solution: Also consider directory entries with d_type = DT_UNKNOWN.
Reproduction: Use zkey with a zkey repository directory located in a file
               system that does not have full support for returning the file
               type, such as XFS. Generate a key in the repository and then
               list the key s with 'zkey list'.
               Note: Newly created XFS file systems usually support returning
               the file type, but existing XFS file systems might not. To
               create an XFS file system that does not support returning the
               file type, use 'mkfs.xfs -f -m crc=0 -n ftype=0' to create
               the file system.

Upstream-ID: 0de533aef9def920fed751c6025e4f19c4cba763

Component: s390-tools

Need to be applied to all distro in service

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-183137 severity-high targetmilestone-inin2004
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → s390-tools (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Frank Heimes (fheimes) wrote :

The patch is not in s390-tools 2.12, so its needed to apply it on top of 2.12 that is the target for focal. zkey is also supported on eoan, but not on older releases like xenial or bionic.
Hence I've added the relevant targets.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Frank Heimes (fheimes)
no longer affects: ubuntu-z-systems/ubuntu-18.04
Changed in s390-tools (Ubuntu Bionic):
status: New → Triaged
Changed in s390-tools (Ubuntu Eoan):
status: New → Triaged
Changed in s390-tools (Ubuntu Focal):
status: New → Triaged
Changed in s390-tools (Ubuntu Focal):
status: Triaged → Fix Committed
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package s390-tools - 2.12.0-0ubuntu1

---------------
s390-tools (2.12.0-0ubuntu1) focal; urgency=medium

  * New upstream release, plus cherrypick patches from master.
    LP: #1860574 LP: #1860531 LP: #1859018 LP: #1853308

 -- Dimitri John Ledkov <email address hidden> Wed, 29 Jan 2020 22:27:05 +0000

Changed in s390-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
summary: - [UBUNTU] zkey: Fix listing of keys on file systems reporting DT_UNKNOWN.
+ [UBUNTU 20.04] zkey: Fix listing of keys on file systems reporting
+ DT_UNKNOWN.
Revision history for this message
Frank Heimes (fheimes) wrote :

Changing the Eoan entry to Invalid, since Eoan reached it's EOL: https://lists.ubuntu.com/archives/ubuntu-announce/2020-July/000258.html

Changed in s390-tools (Ubuntu Eoan):
status: Triaged → Invalid
Frank Heimes (fheimes)
Changed in s390-tools (Ubuntu Eoan):
status: Invalid → Won't Fix
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-27 07:46 EDT-------
Fix released by groovy+focal, what about bionic?

tags: added: fr-882
Revision history for this message
Lukas Märdian (slyon) wrote :

The 'zkey list' command does not seem to be available in Bionic. Also the patched zkey/keystore.c file does not exist in s390-tools v2.3.0, so it looks like this bug isn't available either:

ubuntu@juju-96c787-test-0:~$ zkey list
zkey: Invalid command 'list'
Try 'zkey --help' for more information.
ubuntu@juju-96c787-test-0:~$ zkey --help
Usage: zkey COMMAND SECURE-KEY-FILE [OPTIONS]

Generate, re-encipher, and validate secure AES keys

COMMANDS
  GENerate Generate a secure AES key
  REencipher Re-encipher an existing secure AES key
  VALidate Validate an existing secure AES key

COMMON OPTIONS
 -V, --verbose Print additional information messages during processing
 -h, --help Print this help, then exit
 -v, --version Print version information, then exit

For more information use 'zkey COMMAND --help'.
ubuntu@juju-96c787-test-0:~$ zkey -v
zkey version 2.3.0-build-20191025
Copyright IBM Corp. 2017

Changed in s390-tools (Ubuntu Bionic):
status: Triaged → Incomplete
Frank Heimes (fheimes)
Changed in s390-tools (Ubuntu Bionic):
status: Incomplete → Invalid
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-11-18 08:48 EDT-------
After investigation , not required for bionic...

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx, so I am closing this ticket in this case and I'm setting the project entry to Fix Released (aligning it's state to the focal entry).

Changed in ubuntu-z-systems:
status: In Progress → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-11-18 09:38 EDT-------
IBM Bugzilla status->closed, Fix Released for all requested distros..

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.