16 lines
685 B
Bash
Executable File
16 lines
685 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# CVE-2015-1328: kernel version check against the three listed fixed builds. No exploit code.
|
|
set -u
|
|
skip() { echo "SKIP: $*"; exit 0; }
|
|
fail() { echo "FAIL: $*"; exit 1; }
|
|
pass() { echo "PASS: $*"; exit 0; }
|
|
|
|
full=$(uname -r)
|
|
major=$(echo "$full" | grep -oE '^[0-9]+')
|
|
[ -n "$major" ] || skip "could not parse kernel version from '$full'"
|
|
|
|
if [ "$major" -ge 4 ]; then
|
|
pass "kernel $full, major version 4 or newer, long past this 3.x-era fix"
|
|
fi
|
|
skip "kernel $full is on the 3.x branch this bug targeted; this check cannot tell a patched 3.13.0-55.92/3.16.0-41.55/3.19.0-21.21 point release from an unpatched one, check the Ubuntu advisory for the exact build"
|