summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado2016-12-09 16:53:37 -0300
committerAndré Fabian Silva Delgado2016-12-09 17:26:07 -0300
commit0881b09a10c86894820eb0babcc47a1e35b0d68d (patch)
tree0aed4db70ff0dbb92d92e3ef74e0085c93fc1728
parentb55df79c265fab557d58db453bb8df1c56809e7c (diff)
downloadaur-0881b09a10c86894820eb0babcc47a1e35b0d68d.tar.gz
Update to 4.8.12_gnu-2
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD26
-rw-r--r--config.armv7h19
-rw-r--r--fix_race_condition_in_packet_set_ring.diff84
4 files changed, 128 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3db7daba8675..6e8f61163876 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Nov 26 14:40:30 UTC 2016
+# Fri Dec 9 20:26:06 UTC 2016
pkgbase = linux-libre
- pkgver = 4.8.10_gnu
- pkgrel = 1
- url = http://linux-libre.fsfla.org/
+ pkgver = 4.8.12_gnu
+ pkgrel = 2
+ url = https://linux-libre.fsfla.org/
arch = i686
arch = x86_64
arch = armv7h
@@ -15,10 +15,10 @@ pkgbase = linux-libre
makedepends = bc
makedepends = libelf
options = !strip
- source = http://linux-libre.fsfla.org/pub/linux-libre/releases/4.8-gnu/linux-libre-4.8-gnu.tar.xz
- source = http://linux-libre.fsfla.org/pub/linux-libre/releases/4.8-gnu/linux-libre-4.8-gnu.tar.xz.sign
- source = http://linux-libre.fsfla.org/pub/linux-libre/releases/4.8.10-gnu/patch-4.8-gnu-4.8.10-gnu.xz
- source = http://linux-libre.fsfla.org/pub/linux-libre/releases/4.8.10-gnu/patch-4.8-gnu-4.8.10-gnu.xz.sign
+ source = https://linux-libre.fsfla.org/pub/linux-libre/releases/4.8-gnu/linux-libre-4.8-gnu.tar.xz
+ source = https://linux-libre.fsfla.org/pub/linux-libre/releases/4.8-gnu/linux-libre-4.8-gnu.tar.xz.sign
+ source = https://linux-libre.fsfla.org/pub/linux-libre/releases/4.8.12-gnu/patch-4.8-gnu-4.8.12-gnu.xz
+ source = https://linux-libre.fsfla.org/pub/linux-libre/releases/4.8.12-gnu/patch-4.8-gnu-4.8.12-gnu.xz.sign
source = https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm
source = https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm.sig
source = https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm
@@ -31,10 +31,11 @@ pkgbase = linux-libre
source = 99-linux.hook
source = linux.preset
source = change-default-console-loglevel.patch
+ source = fix_race_condition_in_packet_set_ring.diff
source = 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
source = 0002-fix-Atmel-maXTouch-touchscreen-support.patch
- source = https://repo.parabola.nu/other/rcn-libre/patches/4.8.10/rcn-libre-4.8.10-armv7-x4.patch
- source = https://repo.parabola.nu/other/rcn-libre/patches/4.8.10/rcn-libre-4.8.10-armv7-x4.patch.sig
+ source = https://repo.parabola.nu/other/rcn-libre/patches/4.8.12/rcn-libre-4.8.12-armv7-x4.patch
+ source = https://repo.parabola.nu/other/rcn-libre/patches/4.8.12/rcn-libre-4.8.12-armv7-x4.patch.sig
source = 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch
source = 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
source = 0003-SMILE-Plug-device-tree-file.patch
@@ -50,7 +51,7 @@ pkgbase = linux-libre
source = 0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch
sha256sums = d54e0f8a27e24f3666c19b395c19dba194635db26929c89e78ffa4b2b0e8ca3a
sha256sums = SKIP
- sha256sums = 1582cc01f7c10fdb24a15d884e6d3c24331f54dcbe6dcae0e5ca8b58955dce0c
+ sha256sums = 2305f73842bf41755c082900694d2f756787a9d5f7c37fd6a8ec387405e944ae
sha256sums = SKIP
sha256sums = bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494
sha256sums = SKIP
@@ -60,13 +61,14 @@ pkgbase = linux-libre
sha256sums = SKIP
sha256sums = 6d010582398bb7b08d9b0ae111bd0d7d73ef987ed61af9e70eb6dbb99cf23974
sha256sums = 00c755903fe04ab18d7204c60e938b0c8f48b0a6b9a6c2623dc77d2e03bcb228
- sha256sums = 08dbb14bb40bb55bc031d8fcbbe99c623373cb3054bd4688613dd9e0ca907d37
+ sha256sums = 8ea1892dfba38b6a9d002a2504ae2e0b0551c5071fd638aaeebe0767d3354b03
sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
+ sha256sums = ad1ee95f906f88d31fcdb9273cd08e02e8eda177449f0c98dc1bff8cbf1483c2
sha256sums = 0376bd5efa31d4e2a9d52558777cebd9f0941df8e1adab916c868bf0c05f2fc3
sha256sums = 351fd96be8cd5ebd0435c0a8a978673fc023e3b1026085e67f86d815b2285e25
- sha256sums = 7bc2f17f96bc885b76cc2158c5e1d18989292792f6ca06f0610bcb5e572b3e7d
+ sha256sums = f1e9e280b9ed8c5e12c8a6fd6dcfd638137ef6555d0dd5e28dbd8ad93ff81fe0
sha256sums = SKIP
sha256sums = 858eac5f4aadb7a4157a36b31d101d75d841a9c58199e580201d8305356044e3
sha256sums = eee25f5fa6e6b0fb3d5ab913521af67adf788b8613cad1b6d38711261f70646f
@@ -90,7 +92,7 @@ pkgname = linux-libre
depends = linux-libre-firmware
depends = kmod
optdepends = crda: to set the correct wireless channels of your country
- provides = linux=4.8.10
+ provides = linux=4.8.12
conflicts =
replaces =
depends_i686 = mkinitcpio>=0.7
@@ -98,13 +100,13 @@ pkgname = linux-libre
pkgname = linux-libre-headers
pkgdesc = Header files and scripts for building modules for Linux-libre kernel
- provides = linux-headers=4.8.10
+ provides = linux-headers=4.8.12
conflicts =
replaces =
pkgname = linux-libre-docs
pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-libre kernel
- provides = linux-docs=4.8.10
+ provides = linux-docs=4.8.12
conflicts =
replaces =
diff --git a/PKGBUILD b/PKGBUILD
index a0dd962d5a9e..e6e80757b59f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@
pkgbase=linux-libre # Build stock kernel
#pkgbase=linux-libre-custom # Build kernel with a different name
_pkgbasever=4.8-gnu
-_pkgver=4.8.10-gnu
+_pkgver=4.8.12-gnu
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
_replacesoldkernels=() # '%' gets replaced with _kernelname
@@ -20,18 +20,18 @@ _replacesoldmodules=() # '%' gets replaced with _kernelname
_srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}
-pkgrel=1
+pkgrel=2
rcnrel=armv7-x4
arch=('i686' 'x86_64' 'armv7h')
-url="http://linux-libre.fsfla.org/"
+url="https://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf')
makedepends_armv7h=('git')
options=('!strip')
-source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz.sign"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz.sign"
+source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"
+ "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz.sign"
+ "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"
+ "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz.sign"
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm"
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm.sig"
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm"
@@ -45,6 +45,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch'
+ 'fix_race_condition_in_packet_set_ring.diff'
'0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
'0002-fix-Atmel-maXTouch-touchscreen-support.patch'
# armv7h patches
@@ -65,7 +66,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li
'0013-Revert-gpu-drm-omapdrm-dss-of-add-missing-of_node_pu.patch')
sha256sums=('d54e0f8a27e24f3666c19b395c19dba194635db26929c89e78ffa4b2b0e8ca3a'
'SKIP'
- '1582cc01f7c10fdb24a15d884e6d3c24331f54dcbe6dcae0e5ca8b58955dce0c'
+ '2305f73842bf41755c082900694d2f756787a9d5f7c37fd6a8ec387405e944ae'
'SKIP'
'bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494'
'SKIP'
@@ -75,13 +76,14 @@ sha256sums=('d54e0f8a27e24f3666c19b395c19dba194635db26929c89e78ffa4b2b0e8ca3a'
'SKIP'
'6d010582398bb7b08d9b0ae111bd0d7d73ef987ed61af9e70eb6dbb99cf23974'
'00c755903fe04ab18d7204c60e938b0c8f48b0a6b9a6c2623dc77d2e03bcb228'
- '08dbb14bb40bb55bc031d8fcbbe99c623373cb3054bd4688613dd9e0ca907d37'
+ '8ea1892dfba38b6a9d002a2504ae2e0b0551c5071fd638aaeebe0767d3354b03'
'834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
+ 'ad1ee95f906f88d31fcdb9273cd08e02e8eda177449f0c98dc1bff8cbf1483c2'
'0376bd5efa31d4e2a9d52558777cebd9f0941df8e1adab916c868bf0c05f2fc3'
'351fd96be8cd5ebd0435c0a8a978673fc023e3b1026085e67f86d815b2285e25'
- '7bc2f17f96bc885b76cc2158c5e1d18989292792f6ca06f0610bcb5e572b3e7d'
+ 'f1e9e280b9ed8c5e12c8a6fd6dcfd638137ef6555d0dd5e28dbd8ad93ff81fe0'
'SKIP'
'858eac5f4aadb7a4157a36b31d101d75d841a9c58199e580201d8305356044e3'
'eee25f5fa6e6b0fb3d5ab913521af67adf788b8613cad1b6d38711261f70646f'
@@ -147,6 +149,10 @@ prepare() {
install -m644 -t drivers/video/logo \
"${srcdir}/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}
+ # fix a race condition that allows to gain root
+ # https://marc.info/?l=linux-netdev&m=148054660230570&w=2
+ patch -p1 -i "${srcdir}/fix_race_condition_in_packet_set_ring.diff"
+
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
diff --git a/config.armv7h b/config.armv7h
index 91b73302f1a4..78e9e7da3aa5 100644
--- a/config.armv7h
+++ b/config.armv7h
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/arm 4.8.8-gnu-1 Kernel Configuration
+# Linux/arm 4.8.12-gnu-1 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
@@ -114,7 +114,6 @@ CONFIG_SRCU=y
# CONFIG_TASKS_RCU is not set
CONFIG_RCU_STALL_COMMON=y
# CONFIG_TREE_RCU_TRACE is not set
-# CONFIG_RCU_EXPEDITE_BOOT is not set
CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
@@ -4421,16 +4420,16 @@ CONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_TUNER=m
-CONFIG_V4L2_MEM2MEM_DEV=y
+CONFIG_V4L2_MEM2MEM_DEV=m
# CONFIG_V4L2_FLASH_LED_CLASS is not set
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DVB=m
-CONFIG_VIDEOBUF2_CORE=y
-CONFIG_VIDEOBUF2_MEMOPS=y
-CONFIG_VIDEOBUF2_DMA_CONTIG=y
-CONFIG_VIDEOBUF2_VMALLOC=y
+CONFIG_VIDEOBUF2_CORE=m
+CONFIG_VIDEOBUF2_MEMOPS=m
+CONFIG_VIDEOBUF2_DMA_CONTIG=m
+CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_VIDEOBUF2_DMA_SG=m
CONFIG_VIDEOBUF2_DVB=m
CONFIG_DVB_CORE=y
@@ -4722,7 +4721,7 @@ CONFIG_VIDEO_XILINX_TPG=m
CONFIG_VIDEO_XILINX_VTC=m
# CONFIG_VIDEO_TI_CAL is not set
CONFIG_V4L_MEM2MEM_DRIVERS=y
-CONFIG_VIDEO_CODA=y
+CONFIG_VIDEO_CODA=m
CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m
# CONFIG_VIDEO_SAMSUNG_S5P_G2D is not set
CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
@@ -7755,7 +7754,9 @@ CONFIG_HAVE_DEBUG_KMEMLEAK=y
#
# Debug Lockups and Hangs
#
-# CONFIG_LOCKUP_DETECTOR is not set
+CONFIG_LOCKUP_DETECTOR=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
diff --git a/fix_race_condition_in_packet_set_ring.diff b/fix_race_condition_in_packet_set_ring.diff
new file mode 100644
index 000000000000..12048f611d1a
--- /dev/null
+++ b/fix_race_condition_in_packet_set_ring.diff
@@ -0,0 +1,84 @@
+From: Philip Pettersson <philip.pettersson@gmail.com>
+
+When packet_set_ring creates a ring buffer it will initialize a
+struct timer_list if the packet version is TPACKET_V3. This value
+can then be raced by a different thread calling setsockopt to
+set the version to TPACKET_V1 before packet_set_ring has finished.
+
+This leads to a use-after-free on a function pointer in the
+struct timer_list when the socket is closed as the previously
+initialized timer will not be deleted.
+
+The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
+changing the packet version while also taking the lock at the start
+of packet_set_ring.
+
+Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
+Signed-off-by: Philip Pettersson <philip.pettersson@gmail.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+---
+ net/packet/af_packet.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index d2238b204691b8e4f2e3acb9bc167b553ba32d50..dd2332390c45bbff7c3fc5d259453f2e1ca352bf 100644
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -3648,19 +3648,25 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
+
+ if (optlen != sizeof(val))
+ return -EINVAL;
+- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
+- return -EBUSY;
+ if (copy_from_user(&val, optval, sizeof(val)))
+ return -EFAULT;
+ switch (val) {
+ case TPACKET_V1:
+ case TPACKET_V2:
+ case TPACKET_V3:
+- po->tp_version = val;
+- return 0;
++ break;
+ default:
+ return -EINVAL;
+ }
++ lock_sock(sk);
++ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
++ ret = -EBUSY;
++ } else {
++ po->tp_version = val;
++ ret = 0;
++ }
++ release_sock(sk);
++ return ret;
+ }
+ case PACKET_RESERVE:
+ {
+@@ -4164,6 +4170,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
+ /* Added to avoid minimal code churn */
+ struct tpacket_req *req = &req_u->req;
+
++ lock_sock(sk);
+ /* Opening a Tx-ring is NOT supported in TPACKET_V3 */
+ if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
+ net_warn_ratelimited("Tx-ring is not supported.\n");
+@@ -4245,7 +4252,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
+ goto out;
+ }
+
+- lock_sock(sk);
+
+ /* Detach socket from network */
+ spin_lock(&po->bind_lock);
+@@ -4294,11 +4300,11 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
+ if (!tx_ring)
+ prb_shutdown_retire_blk_timer(po, rb_queue);
+ }
+- release_sock(sk);
+
+ if (pg_vec)
+ free_pg_vec(pg_vec, order, req->tp_block_nr);
+ out:
++ release_sock(sk);
+ return err;
+ }