Release linux (4.2.1-2).

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAVggkn+e/yOyVhhEJAQp5tA//RSYWzmr1GYzsO0GdQf2VHjEVn533NGWJ
 cB08dkPDadnnmAA0T1SswWCuAJpdr/AAOKvvaD+sfWPrnIMrGs4E1B3HloQPFnbU
 n7cxIzWikH7PzizkxwFlcvquNBGCetP1Ztl2KmuLwxN/bHL0z/gZRFqz6pzanVp+
 sXhoZa/dikFVrcTNOZcyVwpguwStI8BNOgsK+YWWGMGqvp+Uh82/MMjKmEgo8Qeh
 3pYmza+uNtMvhJJKt7/ALUAcOwXw7HS8GLjojPJiCHIYy0DTFfNtxyos0gzzPRhP
 kvRrjEWOT0OcbVKAHpfTaCWZSFGFgVTiZV0WwN26+iNmsTgHo69esDbB2XU50837
 bkIMrBCGQxbT5GrRXIQXx4RC693MFy2vZw+MT48Pr2c3VV4mJ8sthl6c3bdghB7l
 J417512J9kE8l2ESFEnqoFk7nFH3UywmIvgWQzaPctUF7E+ZR5oM4Ejo3NNWGJ7U
 c7gWwBX45AAKRl5dMbqn6DWzxymJFL/dCiWwr4t7eiDzAGCQMq7gT/jQMH0LfOAu
 WLKoxLeZERcLIIlfqbxzxmu2/qkGNN97w/hlwmDWLizlFLRnmWj5s0r7/f7Se5g/
 KYMJBtFvN/+0igiJGcwDMYNEE2TbgXxTP46xkcCad7xZh/GZP/Lrtpmc4l7hjFwC
 K9Gq6Sh9Lms=
 =w3w8
 -----END PGP SIGNATURE-----

Merge tag 'debian/4.2.1-2'

Drop one added patch that is already included in 4.3-rc2.
This commit is contained in:
Ben Hutchings 2015-09-27 18:20:06 +01:00
commit 346c496823
15 changed files with 336 additions and 17 deletions

12
debian/changelog vendored
View File

@ -4,6 +4,18 @@ linux (4.3~rc2-1~exp1) UNRELEASED; urgency=medium
-- Ben Hutchings <ben@decadent.org.uk> Sat, 26 Sep 2015 16:41:55 +0100
linux (4.2.1-2) unstable; urgency=medium
* media: uvcvideo: Disable hardware timestamps by default (Closes: #794327)
* [mips*] udeb: Remove 'Provides: ata-modules' from kernel-image
* [hppa/parisc64-smp,mips*el/loongson-3] udeb: Remove i2c-modules again, as
the drivers that belong in it are actually built-in (fixes FTBFS)
* sctp: fix race on protocol/netns initialization (CVE-2015-5283)
* [mips*] pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure
(regression in 4.0, but not a build failure for us)
-- Ben Hutchings <ben@decadent.org.uk> Sun, 27 Sep 2015 14:17:34 +0100
linux (4.2.1-1) unstable; urgency=medium
* New upstream stable update:

View File

@ -37,6 +37,16 @@ CONFIG_IPMI_POWEROFF=m
CONFIG_DRM=y
CONFIG_DRM_RADEON=m
##
## file: drivers/i2c/Kconfig
##
CONFIG_I2C=y
##
## file: drivers/i2c/algos/Kconfig
##
CONFIG_I2C_ALGOBIT=y
##
## file: mm/Kconfig
##

View File

@ -33,6 +33,16 @@ CONFIG_SATA_AHCI=y
CONFIG_DRM=m
CONFIG_DRM_RADEON=m
##
## file: drivers/i2c/Kconfig
##
CONFIG_I2C=y
##
## file: drivers/i2c/algos/Kconfig
##
CONFIG_I2C_ALGOBIT=y
##
## file: drivers/net/ethernet/8390/Kconfig
##

View File

@ -6,10 +6,7 @@
Package: kernel-image
Package: usb-storage-modules
Depends: kernel-image, ide-modules, scsi-modules, usb-modules
Package: ide-modules
Depends: kernel-image, ide-core-modules, nls-core-modules
Depends: kernel-image, scsi-modules, usb-modules
Package: pata-modules
Depends: kernel-image, ata-modules, scsi-core-modules

View File

@ -1 +0,0 @@
#include <i2c-modules>

View File

@ -4,12 +4,10 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
Package: kernel-image
Provides_parisc64-smp: i2c-modules
Package: usb-storage-modules
Depends: kernel-image, ide-modules, scsi-modules, usb-modules
Package: ide-modules
Depends: kernel-image, ide-core-modules, nls-core-modules
Depends: kernel-image, scsi-modules, usb-modules
Package: pata-modules
Depends: kernel-image, ata-modules, scsi-core-modules

View File

@ -4,6 +4,3 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
#Package: ide-modules
# add kernel/drivers/* I think
# also SCSI drivers are now modular…

View File

@ -4,4 +4,4 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
Package: kernel-image
Provides: ata-modules, rtc-modules
Provides: rtc-modules

View File

@ -4,4 +4,4 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
Package: kernel-image
Provides: ata-modules, rtc-modules
Provides: rtc-modules

View File

@ -4,4 +4,5 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
Package: kernel-image
Provides: ata-modules, rtc-modules
Provides: rtc-modules
Provides_loongson-3: i2c-modules, rtc-modules

View File

@ -1 +0,0 @@
#include <i2c-modules>

View File

@ -4,4 +4,5 @@
# It overwrites specifications from /usr/share/kernel-wedge/package-list.
#
Package: kernel-image
Provides: ata-modules, rtc-modules
Provides: rtc-modules
Provides_loongson-3: i2c-modules, rtc-modules

View File

@ -0,0 +1,66 @@
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Mon, 27 Jul 2015 11:06:48 -0300
Subject: [media] uvcvideo: Disable hardware timestamps by default
Origin: http://git.linuxtv.org/cgit.cgi/media_tree.git/commit?id=5d0fd3c806b9e932010931ae67dbb482020e0882
Bug-Debian: https://bugs.debian.org/794327
The hardware timestamping implementation has been reported as not
working correctly on at least the Logitech C920. Until this can be
fixed, disable it by default.
Reported-by: Peter Rabbitson <rabbit@rabbit.us>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
drivers/media/usb/uvc/uvc_driver.c | 3 +++
drivers/media/usb/uvc/uvc_video.c | 3 +++
drivers/media/usb/uvc/uvcvideo.h | 1 +
3 files changed, 7 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 4b5b3e8..d11fd6a 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -32,6 +32,7 @@
#define DRIVER_DESC "USB Video Class driver"
unsigned int uvc_clock_param = CLOCK_MONOTONIC;
+unsigned int uvc_hw_timestamps_param;
unsigned int uvc_no_drop_param;
static unsigned int uvc_quirks_param = -1;
unsigned int uvc_trace_param;
@@ -2078,6 +2079,8 @@ static int uvc_clock_param_set(const char *val, struct kernel_param *kp)
module_param_call(clock, uvc_clock_param_set, uvc_clock_param_get,
&uvc_clock_param, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(clock, "Video buffers timestamp clock");
+module_param_named(hwtimestamps, uvc_hw_timestamps_param, uint, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(hwtimestamps, "Use hardware timestamps");
module_param_named(nodrop, uvc_no_drop_param, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(nodrop, "Don't drop incomplete frames");
module_param_named(quirks, uvc_quirks_param, uint, S_IRUGO|S_IWUSR);
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index f839654..1c4a117 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -623,6 +623,9 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
u32 rem;
u64 y;
+ if (!uvc_hw_timestamps_param)
+ return;
+
spin_lock_irqsave(&clock->lock, flags);
if (clock->count < clock->size)
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 816dd1a..1374bd9 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -593,6 +593,7 @@ extern unsigned int uvc_clock_param;
extern unsigned int uvc_no_drop_param;
extern unsigned int uvc_trace_param;
extern unsigned int uvc_timeout_param;
+extern unsigned int uvc_hw_timestamps_param;
#define uvc_trace(flag, msg...) \
do { \

View File

@ -0,0 +1,227 @@
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Thu, 10 Sep 2015 17:31:15 -0300
Subject: sctp: fix race on protocol/netns initialization
Origin: https://git.kernel.org/linus/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
goto err_protosw_init;
status = sctp_v6_protosw_init();
if (status)
goto err_v6_protosw_init;
status = register_pernet_subsys(&sctp_net_ops);
The problem is that after those calls to sctp_v{4,6}_protosw_init(), it
is possible for userspace to create SCTP sockets like if the module is
already fully loaded. If that happens, one of the possible effects is
that we will have readers for net->sctp.local_addr_list list earlier
than expected and sctp_net_init() does not take precautions while
dealing with that list, leading to a potential panic but not limited to
that, as sctp_sock_init() will copy a bunch of blank/partially
initialized values from net->sctp.
The race happens like this:
CPU 0 | CPU 1
socket() |
__sock_create | socket()
inet_create | __sock_create
list_for_each_entry_rcu( |
answer, &inetsw[sock->type], |
list) { | inet_create
/* no hits */ |
if (unlikely(err)) { |
... |
request_module() |
/* socket creation is blocked |
* the module is fully loaded |
*/ |
sctp_init |
sctp_v4_protosw_init |
inet_register_protosw |
list_add_rcu(&p->list, |
last_perm); |
| list_for_each_entry_rcu(
| answer, &inetsw[sock->type],
sctp_v6_protosw_init | list) {
| /* hit, so assumes protocol
| * is already loaded
| */
| /* socket creation continues
| * before netns is initialized
| */
register_pernet_subsys |
Simply inverting the initialization order between
register_pernet_subsys() and sctp_v4_protosw_init() is not possible
because register_pernet_subsys() will create a control sctp socket, so
the protocol must be already visible by then. Deferring the socket
creation to a work-queue is not good specially because we loose the
ability to handle its errors.
So, as suggested by Vlad, the fix is to split netns initialization in
two moments: defaults and control socket, so that the defaults are
already loaded by when we register the protocol, while control socket
initialization is kept at the same moment it is today.
Fixes: 4db67e808640 ("sctp: Make the address lists per network namespace")
Signed-off-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/sctp/protocol.c | 64 ++++++++++++++++++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 23 deletions(-)
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1166,7 +1166,7 @@ static void sctp_v4_del_protocol(void)
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
}
-static int __net_init sctp_net_init(struct net *net)
+static int __net_init sctp_defaults_init(struct net *net)
{
int status;
@@ -1259,12 +1259,6 @@ static int __net_init sctp_net_init(stru
sctp_dbg_objcnt_init(net);
- /* Initialize the control inode/socket for handling OOTB packets. */
- if ((status = sctp_ctl_sock_init(net))) {
- pr_err("Failed to initialize the SCTP control sock\n");
- goto err_ctl_sock_init;
- }
-
/* Initialize the local address list. */
INIT_LIST_HEAD(&net->sctp.local_addr_list);
spin_lock_init(&net->sctp.local_addr_lock);
@@ -1280,9 +1274,6 @@ static int __net_init sctp_net_init(stru
return 0;
-err_ctl_sock_init:
- sctp_dbg_objcnt_exit(net);
- sctp_proc_exit(net);
err_init_proc:
cleanup_sctp_mibs(net);
err_init_mibs:
@@ -1291,15 +1282,12 @@ err_sysctl_register:
return status;
}
-static void __net_exit sctp_net_exit(struct net *net)
+static void __net_exit sctp_defaults_exit(struct net *net)
{
/* Free the local address list */
sctp_free_addr_wq(net);
sctp_free_local_addr_list(net);
- /* Free the control endpoint. */
- inet_ctl_sock_destroy(net->sctp.ctl_sock);
-
sctp_dbg_objcnt_exit(net);
sctp_proc_exit(net);
@@ -1307,9 +1295,32 @@ static void __net_exit sctp_net_exit(str
sctp_sysctl_net_unregister(net);
}
-static struct pernet_operations sctp_net_ops = {
- .init = sctp_net_init,
- .exit = sctp_net_exit,
+static struct pernet_operations sctp_defaults_ops = {
+ .init = sctp_defaults_init,
+ .exit = sctp_defaults_exit,
+};
+
+static int __net_init sctp_ctrlsock_init(struct net *net)
+{
+ int status;
+
+ /* Initialize the control inode/socket for handling OOTB packets. */
+ status = sctp_ctl_sock_init(net);
+ if (status)
+ pr_err("Failed to initialize the SCTP control sock\n");
+
+ return status;
+}
+
+static void __net_init sctp_ctrlsock_exit(struct net *net)
+{
+ /* Free the control endpoint. */
+ inet_ctl_sock_destroy(net->sctp.ctl_sock);
+}
+
+static struct pernet_operations sctp_ctrlsock_ops = {
+ .init = sctp_ctrlsock_init,
+ .exit = sctp_ctrlsock_exit,
};
/* Initialize the universe into something sensible. */
@@ -1442,8 +1453,11 @@ static __init int sctp_init(void)
sctp_v4_pf_init();
sctp_v6_pf_init();
- status = sctp_v4_protosw_init();
+ status = register_pernet_subsys(&sctp_defaults_ops);
+ if (status)
+ goto err_register_defaults;
+ status = sctp_v4_protosw_init();
if (status)
goto err_protosw_init;
@@ -1451,9 +1465,9 @@ static __init int sctp_init(void)
if (status)
goto err_v6_protosw_init;
- status = register_pernet_subsys(&sctp_net_ops);
+ status = register_pernet_subsys(&sctp_ctrlsock_ops);
if (status)
- goto err_register_pernet_subsys;
+ goto err_register_ctrlsock;
status = sctp_v4_add_protocol();
if (status)
@@ -1469,12 +1483,14 @@ out:
err_v6_add_protocol:
sctp_v4_del_protocol();
err_add_protocol:
- unregister_pernet_subsys(&sctp_net_ops);
-err_register_pernet_subsys:
+ unregister_pernet_subsys(&sctp_ctrlsock_ops);
+err_register_ctrlsock:
sctp_v6_protosw_exit();
err_v6_protosw_init:
sctp_v4_protosw_exit();
err_protosw_init:
+ unregister_pernet_subsys(&sctp_defaults_ops);
+err_register_defaults:
sctp_v4_pf_exit();
sctp_v6_pf_exit();
sctp_sysctl_unregister();
@@ -1507,12 +1523,14 @@ static __exit void sctp_exit(void)
sctp_v6_del_protocol();
sctp_v4_del_protocol();
- unregister_pernet_subsys(&sctp_net_ops);
+ unregister_pernet_subsys(&sctp_ctrlsock_ops);
/* Free protosw registrations */
sctp_v6_protosw_exit();
sctp_v4_protosw_exit();
+ unregister_pernet_subsys(&sctp_defaults_ops);
+
/* Unregister with socket layer. */
sctp_v6_pf_exit();
sctp_v4_pf_exit();

View File

@ -82,3 +82,5 @@ features/all/grsecurity/grsecurity-kconfig.patch
features/all/grsecurity/grkernsec_perf_harden.patch
bugfix/all/usb-whiteheat-fix-potential-null-deref-at-probe.patch
bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/all/sctp-fix-race-on-protocol-netns-initialization.patch