[UBUNTU] kernel: Fix gcm-aes-s390 wrong scatter-gather list processing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Canonical Kernel Team | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Skipper Bug Screeners | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Cosmic |
Invalid
|
Medium
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Unassigned |
Bug Description
SRU Justification:
==================
[Impact]
* Wrong encryption/
* gcm-aes-s390 does not process scatter-gather input and output lists correctly if list entries of sizes being not multiples of the blocksize (16 bytes) are used, which results in wrong calculations.
[Fix]
* bef9f0ba300a55d
[Test Case]
* z14 with kernel >= 5.1 needed
* If disabled, enable the crypto self tests.
* Monitor syslog during modprobe of the aes_s390 kernel module. As this module usually gets automatically inserted during system startup you may need to unload the aes_s390 kernel module before re-inserting it.
* Without the fix a message like "kernel: alg: aead: gcm-aes-s390 encryption test failed (wrong result) on test vector 1,..." will show up.
* With the fix, all selftests will pass and nothing is reported in syslog.
[Regression Potential]
* The regression potential can be considered as low since this is purely s390x specific
* affects one mode of the hardware crypto facility CPACF
* and happens only on z14 (since z14 is the only model that currently supports the gcm-aes-s390 mode).
* Applications using aes-gcm via the AF_ALG interface are not affected since this API ensures scatter/gather list entries with chunk sizes in multiples of 16 bytes.
* Changes are limited to a single s390x crypto file /arch/s390/
[Other Info]
* Problem was found during tests at IBM and is a so called 'preventive fix'
* Since this affects z14 only, final test need to be done by IBM.
* Applied cleanly for me on bionic master-next.
__________
Description: kernel: Fix gcm-aes-s390 wrong scatter-gather list processing
Symptom: gcm-aes-s390 wrong en/decryption processing
Problem: The current gcm aes s390 implementation does not process
or decrypted data.
This can only happen on z14 (this is the only machine
that applications using aes-gcm via the AF_ALG interface are
not affected as this API ensures scatter/gather list entries
with chunk sizes in multiples of 16 bytes. However, all
Solution: Rework of the scatter/gather walk within the aes_s390 kernel
Reproduction: With kernel 5.1 there has been an improvement on the crypto
1. You need at least a z14 and kernel >= 5.1.
2. If disabled, enable the crypto self tests.
3. Watch for syslog entries during modprobe of the aes_s390
4. Without the fix something like
Component: kernel
Upstream-ID: bef9f0ba300a55d
This request is targeted for 19.10, but should also be applied to 18.04 and 19.04
CVE References
tags: | added: architecture-s39064 bugnameltc-178123 severity-high targetmilestone-inin1910 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Canonical Kernel Team (canonical-kernel-team) |
importance: | Undecided → High |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Cosmic): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Bionic): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Disco): | |
status: | New → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Commit ID got upstream accepted with kernel v5.2-rc3, so will be automatically part of 19.10, when target kernel 5.2 finally lands in eoan.
Kernel SRU needed for 19.04 and 18.04.