diff -Nru openafs-1.6.9/debian/changelog openafs-1.6.9/debian/changelog --- openafs-1.6.9/debian/changelog 2014-06-12 15:49:00.000000000 -0400 +++ openafs-1.6.9/debian/changelog 2014-09-17 21:51:37.000000000 -0400 @@ -1,8 +1,21 @@ +openafs (1.6.9-1+ubuntu1) utopic; urgency=medium + + [ Russ Allbery ] + * Retroactively add the CVE for OPENAFS-SA-2014-002 to the changelog for + 1.6.9-1. It was assigned after the release was uploaded. + + [ Anders Kaseorg ] + * Apply upstream patches for Linux 3.16 suport (LP: #1341046): + - [ae86b07f] Linux 3.16: Switch to iter_file_splice_write + - [f3c0f741] Linux 3.16: Convert to new write_iter/read_iter ops + + -- Anders Kaseorg Wed, 17 Sep 2014 21:51:37 -0400 + openafs (1.6.9-1) unstable; urgency=high * New upstream release. - OPENAFS-SA-2014-002: Fix use of uninitialized memory in the host - object in the fileserver. + object in the fileserver. (CVE-2014-4044) -- Russ Allbery Thu, 12 Jun 2014 12:39:25 -0700 diff -Nru openafs-1.6.9/debian/control openafs-1.6.9/debian/control --- openafs-1.6.9/debian/control 2014-06-12 15:49:00.000000000 -0400 +++ openafs-1.6.9/debian/control 2014-09-17 22:00:24.000000000 -0400 @@ -1,7 +1,8 @@ Source: openafs Section: net Priority: optional -Maintainer: Russ Allbery +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Russ Allbery Uploaders: Sam Hartman Build-Depends: debhelper (>= 9), autoconf, automake, bison, comerr-dev, cpio, flex, hardening-wrapper, libfuse-dev, libkrb5-dev, libncurses5-dev, diff -Nru openafs-1.6.9/debian/patches/Linux-3.16-Convert-to-new-write_iter-read_iter-ops.patch openafs-1.6.9/debian/patches/Linux-3.16-Convert-to-new-write_iter-read_iter-ops.patch --- openafs-1.6.9/debian/patches/Linux-3.16-Convert-to-new-write_iter-read_iter-ops.patch 1969-12-31 19:00:00.000000000 -0500 +++ openafs-1.6.9/debian/patches/Linux-3.16-Convert-to-new-write_iter-read_iter-ops.patch 2014-09-17 21:59:04.000000000 -0400 @@ -0,0 +1,136 @@ +From: Marc Dionne +Subject: Linux 3.16: Convert to new write_iter/read_iter ops + +Change read/write operations to the new write_iter/read_iter +operations. + +Reviewed-on: http://gerrit.openafs.org/11303 +Reviewed-by: Chas Williams - CONTRACTOR +Tested-by: Chas Williams - CONTRACTOR +Reviewed-by: Jeffrey Altman +Tested-by: Jeffrey Altman +(cherry picked from commit a303bb257ed9e790d8c14644779e9508167887b6) + +Change-Id: I3f66104be067698a4724ed78537765cf26d4aa10 +Reviewed-on: http://gerrit.openafs.org/11309 +Reviewed-by: Chas Williams - CONTRACTOR +Tested-by: BuildBot +Reviewed-by: Stephan Wiesand + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1341046 +Origin: upstream, http://git.openafs.org/?p=openafs.git;a=commit;h=f3c0f74186f4a323ffc5f125d961fe384d396cac +Applied-Upstream: 1.6.10pre1, http://git.openafs.org/?p=openafs.git;a=commit;h=f3c0f74186f4a323ffc5f125d961fe384d396cac +Last-Update: 2014-09-17 +--- + acinclude.m4 | 1 + + src/afs/LINUX/osi_vnodeops.c | 38 +++++++++++++++++++++++++++++++++----- + 2 files changed, 34 insertions(+), 5 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 83a1a8c..13d70db 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -836,6 +836,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [iterate], [fs.h]) ++ AC_CHECK_LINUX_STRUCT([file_operations], [read_iter], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) + AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h]) +diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c +index 441cce7..818debe 100644 +--- a/src/afs/LINUX/osi_vnodeops.c ++++ b/src/afs/LINUX/osi_vnodeops.c +@@ -99,8 +99,11 @@ afs_linux_VerifyVCache(struct vcache *avc, cred_t **retcred) { + return afs_convert_code(code); + } + +-#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ +-# ifdef LINUX_HAS_NONVECTOR_AIO ++#if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) || defined(HAVE_LINUX_GENERIC_FILE_AIO_READ) ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++static ssize_t ++afs_linux_read_iter(struct kiocb *iocb, struct iov_iter *iter) ++# elif defined(LINUX_HAS_NONVECTOR_AIO) + static ssize_t + afs_linux_aio_read(struct kiocb *iocb, char __user *buf, size_t bufsize, + loff_t pos) +@@ -113,6 +116,11 @@ afs_linux_aio_read(struct kiocb *iocb, const struct iovec *buf, + struct file *fp = iocb->ki_filp; + ssize_t code = 0; + struct vcache *vcp = VTOAFS(fp->f_dentry->d_inode); ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++ loff_t pos = iocb->ki_pos; ++ unsigned long bufsize = iter->nr_segs; ++# endif ++ + + AFS_GLOCK(); + afs_Trace4(afs_iclSetp, CM_TRACE_AIOREADOP, ICL_TYPE_POINTER, vcp, +@@ -125,7 +133,11 @@ afs_linux_aio_read(struct kiocb *iocb, const struct iovec *buf, + * so we optimise by not using it */ + osi_FlushPages(vcp, NULL); /* ensure stale pages are gone */ + AFS_GUNLOCK(); ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++ code = generic_file_read_iter(iocb, iter); ++# else + code = generic_file_aio_read(iocb, buf, bufsize, pos); ++# endif + AFS_GLOCK(); + } + +@@ -170,8 +182,11 @@ afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp) + * also take care of re-positioning the pointer if file is open in append + * mode. Call fake open/close to ensure we do writes of core dumps. + */ +-#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ +-# ifdef LINUX_HAS_NONVECTOR_AIO ++#if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) || defined(HAVE_LINUX_GENERIC_FILE_AIO_READ) ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++static ssize_t ++afs_linux_write_iter(struct kiocb *iocb, struct iov_iter *iter) ++# elif defined(LINUX_HAS_NONVECTOR_AIO) + static ssize_t + afs_linux_aio_write(struct kiocb *iocb, const char __user *buf, size_t bufsize, + loff_t pos) +@@ -184,6 +199,10 @@ afs_linux_aio_write(struct kiocb *iocb, const struct iovec *buf, + ssize_t code = 0; + struct vcache *vcp = VTOAFS(iocb->ki_filp->f_dentry->d_inode); + cred_t *credp; ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++ loff_t pos = iocb->ki_pos; ++ unsigned long bufsize = iter->nr_segs; ++# endif + + AFS_GLOCK(); + +@@ -199,7 +218,11 @@ afs_linux_aio_write(struct kiocb *iocb, const struct iovec *buf, + ReleaseWriteLock(&vcp->lock); + if (code == 0) { + AFS_GUNLOCK(); ++# if defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) ++ code = generic_file_write_iter(iocb, iter); ++# else + code = generic_file_aio_write(iocb, buf, bufsize, pos); ++# endif + AFS_GLOCK(); + } + +@@ -788,7 +811,12 @@ struct file_operations afs_dir_fops = { + }; + + struct file_operations afs_file_fops = { +-#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ ++#ifdef STRUCT_FILE_OPERATIONS_HAS_READ_ITER ++ .read_iter = afs_linux_read_iter, ++ .write_iter = afs_linux_write_iter, ++ .read = new_sync_read, ++ .write = new_sync_write, ++#elif defined(HAVE_LINUX_GENERIC_FILE_AIO_READ) + .aio_read = afs_linux_aio_read, + .aio_write = afs_linux_aio_write, + .read = do_sync_read, +-- +2.1.0 + diff -Nru openafs-1.6.9/debian/patches/Linux-3.16-Switch-to-iter_file_splice_write.patch openafs-1.6.9/debian/patches/Linux-3.16-Switch-to-iter_file_splice_write.patch --- openafs-1.6.9/debian/patches/Linux-3.16-Switch-to-iter_file_splice_write.patch 1969-12-31 19:00:00.000000000 -0500 +++ openafs-1.6.9/debian/patches/Linux-3.16-Switch-to-iter_file_splice_write.patch 2014-09-17 21:57:23.000000000 -0400 @@ -0,0 +1,62 @@ +From: Marc Dionne +Subject: Linux 3.16: Switch to iter_file_splice_write + +Users of generic_file_splice_write need to switch to +using iter_file_splice_write. + +Reviewed-on: http://gerrit.openafs.org/11302 +Reviewed-by: Chas Williams - CONTRACTOR +Tested-by: Chas Williams - CONTRACTOR +Reviewed-by: Jeffrey Altman +Tested-by: Jeffrey Altman +(cherry picked from commit e284db57f94c8f97ed1c95dcd0bd9518d86c050c) + +Change-Id: I6f88ec0388fe43accc150c7243c1a474c9e643af +Reviewed-on: http://gerrit.openafs.org/11308 +Reviewed-by: Chas Williams - CONTRACTOR +Reviewed-by: Benjamin Kaduk +Reviewed-by: Stephan Wiesand +Tested-by: BuildBot + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1341046 +Origin: upstream, http://git.openafs.org/?p=openafs.git;a=commit;h=ae86b07f827d6f3e2032a412f5f6cb3951a27d2d +Applied-Upstream: 1.6.10pre1, http://git.openafs.org/?p=openafs.git;a=commit;h=ae86b07f827d6f3e2032a412f5f6cb3951a27d2d +Last-Update: 2014-09-17 +--- + acinclude.m4 | 3 +++ + src/afs/LINUX/osi_vnodeops.c | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 012d5a4..83a1a8c 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -917,6 +917,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + AC_CHECK_LINUX_FUNC([inode_setattr], + [#include ], + [inode_setattr(NULL, NULL);]) ++ AC_CHECK_LINUX_FUNC([iter_file_splice_write], ++ [#include ], ++ [iter_file_splice_write(NULL,NULL,NULL,0,0);]) + AC_CHECK_LINUX_FUNC([kernel_setsockopt], + [#include ], + [kernel_setsockopt(NULL, 0, 0, NULL, 0);]) +diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c +index 86905c7..441cce7 100644 +--- a/src/afs/LINUX/osi_vnodeops.c ++++ b/src/afs/LINUX/osi_vnodeops.c +@@ -812,7 +812,11 @@ struct file_operations afs_file_fops = { + .sendfile = generic_file_sendfile, + #endif + #if defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE) ++# if defined(HAVE_LINUX_ITER_FILE_SPLICE_WRITE) ++ .splice_write = iter_file_splice_write, ++# else + .splice_write = generic_file_splice_write, ++# endif + .splice_read = generic_file_splice_read, + #endif + .release = afs_linux_release, +-- +2.1.0 + diff -Nru openafs-1.6.9/debian/patches/series openafs-1.6.9/debian/patches/series --- openafs-1.6.9/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ openafs-1.6.9/debian/patches/series 2014-09-17 22:00:03.000000000 -0400 @@ -0,0 +1,2 @@ +Linux-3.16-Switch-to-iter_file_splice_write.patch +Linux-3.16-Convert-to-new-write_iter-read_iter-ops.patch