kernel: bump 4.19 to 4.19.113

Refreshed all patches.

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
Koen Vandeputte 2020-04-01 15:02:25 +02:00 committed by CN_SZTL
parent 9c02ec4602
commit b463749015
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
22 changed files with 40 additions and 111 deletions

View File

@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-4.14 = .173
LINUX_VERSION-4.19 = .110
LINUX_VERSION-4.19 = .113
LINUX_VERSION-5.4 = .28
LINUX_KERNEL_HASH-4.14.173 = a282ad7a445dcfc7ff8939d18d55ee09e59f96d2aa96d05583483f155f1db74f
LINUX_KERNEL_HASH-4.19.110 = ca113d2c4a061cbb6efaab60290b10dda0298e3249ff1d0c2327eb3d827c6b96
LINUX_KERNEL_HASH-4.19.113 = b5a0576d5f7e85aeeba4922fba8d9aa2c2a09cd6f48d07265999b890cf97c0e5
LINUX_KERNEL_HASH-5.4.28 = c863cc1346348f9a40083b4bc0d34375117b1c401af920994d42e855653ef7a4
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))

View File

@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
#include "xhci.h"
#include "xhci-trace.h"
@@ -264,6 +266,458 @@ static void xhci_pme_acpi_rtd3_enable(st
@@ -265,6 +267,458 @@ static void xhci_pme_acpi_rtd3_enable(st
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */
@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
/* called during probe() after chip reset completes */
static int xhci_pci_setup(struct usb_hcd *hcd)
{
@@ -305,6 +759,22 @@ static int xhci_pci_probe(struct pci_dev
@@ -306,6 +760,22 @@ static int xhci_pci_probe(struct pci_dev
struct hc_driver *driver;
struct usb_hcd *hcd;
@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
driver = (struct hc_driver *)id->driver_data;
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
@@ -363,6 +833,16 @@ static void xhci_pci_remove(struct pci_d
@@ -364,6 +834,16 @@ static void xhci_pci_remove(struct pci_d
{
struct xhci_hcd *xhci;

View File

@ -13,7 +13,7 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -217,6 +217,7 @@ static void xhci_pci_quirks(struct devic
@@ -218,6 +218,7 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x0015) {
xhci->quirks |= XHCI_RESET_ON_RESUME;
xhci->quirks |= XHCI_ZERO_64B_REGS;

View File

@ -214,7 +214,7 @@
#include <linux/uaccess.h>
#include <linux/ipv6.h>
#include <linux/icmpv6.h>
@@ -837,10 +838,10 @@ static void tcp_v6_send_response(const s
@@ -836,10 +837,10 @@ static void tcp_v6_send_response(const s
topt = (__be32 *)(t1 + 1);
if (tsecr) {

View File

@ -276,7 +276,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ENDPROC(arm_copy_from_user)
+ENDPROC(__copy_from_user_std)
.pushsection .fixup,"ax"
.pushsection .text.fixup,"ax"
.align 0
--- /dev/null
+++ b/arch/arm/lib/exports_rpi.c

View File

@ -96,7 +96,7 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+whwave,sd3078 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -625,6 +625,15 @@ config RTC_DRV_EM3027
@@ -626,6 +626,15 @@ config RTC_DRV_EM3027
This driver can also be built as a module. If so, the module
will be called rtc-em3027.

View File

@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -224,6 +224,10 @@ static void xhci_pci_quirks(struct devic
@@ -225,6 +225,10 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3432)
xhci->quirks |= XHCI_BROKEN_STREAMS;

View File

@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -225,8 +225,10 @@ static void xhci_pci_quirks(struct devic
@@ -226,8 +226,10 @@ static void xhci_pci_quirks(struct devic
xhci->quirks |= XHCI_BROKEN_STREAMS;
if (pdev->vendor == PCI_VENDOR_ID_VIA &&

View File

@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
@@ -1196,6 +1199,9 @@
@@ -1197,6 +1200,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220

View File

@ -1,71 +0,0 @@
From 82afdcd4ec3c8ca6551cbf7c43c09e2fd240487a Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 10 Mar 2020 15:27:37 +0800
Subject: [PATCH] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Rafał found an issue that for non-Ethernet interface, if we down and up
frequently, the memory will be consumed slowly.
The reason is we add allnodes/allrouters addressed in multicast list in
ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast
addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up()
for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb
getting bigger and bigger. The call stack looks like:
addrconf_notify(NETDEV_REGISTER)
ipv6_add_dev
ipv6_dev_mc_inc(ff01::1)
ipv6_dev_mc_inc(ff02::1)
ipv6_dev_mc_inc(ff02::2)
addrconf_notify(NETDEV_UP)
addrconf_dev_config
/* Alas, we support only Ethernet autoconfiguration. */
return;
addrconf_notify(NETDEV_DOWN)
addrconf_ifdown
ipv6_mc_down
igmp6_group_dropped(ff02::2)
mld_add_delrec(ff02::2)
igmp6_group_dropped(ff02::1)
igmp6_group_dropped(ff01::1)
After investigating, I can't found a rule to disable multicast on
non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM,
tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up()
in inetdev_event(). Even for IPv6, we don't check the dev type and call
ipv6_add_dev(), ipv6_dev_mc_inc() after register device.
So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for
non-Ethernet interface.
v2: Also check IFF_MULTICAST flag to make sure the interface supports
multicast
Reported-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels")
Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/addrconf.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3291,6 +3291,10 @@ static void addrconf_dev_config(struct n
(dev->type != ARPHRD_NONE) &&
(dev->type != ARPHRD_RAWIP)) {
/* Alas, we support only Ethernet autoconfiguration. */
+ idev = __in6_dev_get(dev);
+ if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
+ dev->flags & IFF_MULTICAST)
+ ipv6_mc_up(idev);
return;
}

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1777,6 +1777,19 @@ int phy_set_max_speed(struct phy_device
@@ -1781,6 +1781,19 @@ int phy_set_max_speed(struct phy_device
}
EXPORT_SYMBOL(phy_set_max_speed);
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct device_node *node = phydev->mdio.dev.of_node;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1049,6 +1049,7 @@ int phy_mii_ioctl(struct phy_device *phy
@@ -1051,6 +1051,7 @@ int phy_mii_ioctl(struct phy_device *phy
int phy_start_interrupts(struct phy_device *phydev);
void phy_print_status(struct phy_device *phydev);
int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1790,6 +1790,36 @@ void phy_support_asym_pause(struct phy_d
@@ -1794,6 +1794,36 @@ void phy_support_asym_pause(struct phy_d
}
EXPORT_SYMBOL(phy_support_asym_pause);
@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct device_node *node = phydev->mdio.dev.of_node;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1050,6 +1050,7 @@ int phy_start_interrupts(struct phy_devi
@@ -1052,6 +1052,7 @@ int phy_start_interrupts(struct phy_devi
void phy_print_status(struct phy_device *phydev);
int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
void phy_support_asym_pause(struct phy_device *phydev);

View File

@ -29,7 +29,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -886,8 +886,6 @@ int phy_init_hw(struct phy_device *phyde
@@ -890,8 +890,6 @@ int phy_init_hw(struct phy_device *phyde
if (phydev->drv->soft_reset)
ret = phydev->drv->soft_reset(phydev);

View File

@ -208,7 +208,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
return phydev->drv->read_page(phydev);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -695,17 +695,6 @@ size_t phy_speeds(unsigned int *speeds,
@@ -697,17 +697,6 @@ size_t phy_speeds(unsigned int *speeds,
void phy_resolve_aneg_linkmode(struct phy_device *phydev);
/**
@ -226,7 +226,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_read - Convenience function for reading a given PHY register
* @phydev: the phy_device struct
* @regnum: register number to read
@@ -760,9 +749,60 @@ static inline int __phy_write(struct phy
@@ -762,9 +751,60 @@ static inline int __phy_write(struct phy
val);
}
@ -287,7 +287,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* __phy_set_bits - Convenience function for setting bits in a PHY register
* @phydev: the phy_device struct
@@ -813,6 +853,66 @@ static inline int phy_clear_bits(struct
@@ -815,6 +855,66 @@ static inline int phy_clear_bits(struct
}
/**
@ -354,7 +354,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_interrupt_is_valid - Convenience function for testing a given PHY irq
* @phydev: the phy_device struct
*
@@ -888,18 +988,6 @@ static inline bool phy_is_pseudo_fixed_l
@@ -890,18 +990,6 @@ static inline bool phy_is_pseudo_fixed_l
return phydev->is_pseudo_fixed_link;
}

View File

@ -191,7 +191,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
}
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -795,13 +795,21 @@ int phy_write_mmd(struct phy_device *phy
@@ -797,13 +797,21 @@ int phy_write_mmd(struct phy_device *phy
*/
int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);

View File

@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
*
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1098,6 +1098,7 @@ int genphy_write_mmd_unsupported(struct
@@ -1100,6 +1100,7 @@ int genphy_write_mmd_unsupported(struct
/* Clause 45 PHY */
int genphy_c45_restart_aneg(struct phy_device *phydev);

View File

@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
@@ -944,6 +945,65 @@ void phy_attached_print(struct phy_devic
@@ -948,6 +949,65 @@ void phy_attached_print(struct phy_devic
EXPORT_SYMBOL(phy_attached_print);
/**
@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
@@ -1016,6 +1076,9 @@ int phy_attach_direct(struct net_device
@@ -1020,6 +1080,9 @@ int phy_attach_direct(struct net_device
phydev->attached_dev = dev;
dev->phydev = phydev;
@ -130,7 +130,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
@@ -1950,6 +2013,9 @@ static int phy_remove(struct device *dev
@@ -1954,6 +2017,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
@ -151,7 +151,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
struct sk_buff;
/*
@@ -382,6 +384,8 @@ struct phy_c45_device_ids {
@@ -383,6 +385,8 @@ struct phy_c45_device_ids {
* irq: IRQ number of the PHY's interrupt (-1 if none)
* phy_timer: The timer for handling the state machine
* phy_queue: A work_queue for the phy_mac_interrupt
@ -160,7 +160,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* attached_dev: The attached enet driver's device instance ptr
* adjust_link: Callback for the enet controller to respond to
* changes in the link state.
@@ -471,6 +475,9 @@ struct phy_device {
@@ -473,6 +477,9 @@ struct phy_device {
struct mutex lock;
@ -170,7 +170,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
struct phylink *phylink;
struct net_device *attached_dev;
@@ -1031,6 +1038,10 @@ int phy_suspend(struct phy_device *phyde
@@ -1033,6 +1040,10 @@ int phy_suspend(struct phy_device *phyde
int phy_resume(struct phy_device *phydev);
int __phy_resume(struct phy_device *phydev);
int phy_loopback(struct phy_device *phydev, bool enable);

View File

@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -335,7 +335,7 @@ static int phy_bus_match(struct device *
@@ -339,7 +339,7 @@ static int phy_bus_match(struct device *
if (phydev->is_c45) {
for (i = 1; i < num_ids; i++) {
@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
continue;
if ((phydrv->phy_id & phydrv->phy_id_mask) ==
@@ -623,10 +623,13 @@ static int get_phy_id(struct mii_bus *bu
@@ -627,10 +627,13 @@ static int get_phy_id(struct mii_bus *bu
*/
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
{

View File

@ -1,6 +1,6 @@
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -555,6 +555,12 @@ struct phy_driver {
@@ -557,6 +557,12 @@ struct phy_driver {
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);
@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1577,6 +1577,9 @@ int genphy_update_link(struct phy_device
@@ -1581,6 +1581,9 @@ int genphy_update_link(struct phy_device
{
int status;

View File

@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe)
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2749,6 +2749,8 @@ static const struct seq_operations vmall
@@ -2752,6 +2752,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void)
{
@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3486,6 +3486,8 @@ static __net_initdata struct pernet_oper
@@ -3489,6 +3489,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3265,6 +3267,7 @@ static int packet_create(struct net *net
@@ -3266,6 +3268,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3885,6 +3888,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3886,6 +3889,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
default:
return -ENOPROTOOPT;
}
@@ -3937,6 +3950,13 @@ static int packet_getsockopt(struct sock
@@ -3938,6 +3951,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1201,6 +1201,9 @@ void phy_detach(struct phy_device *phyde
@@ -1205,6 +1205,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = dev->dev.parent->driver->owner;
struct mii_bus *bus;
@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -567,6 +567,12 @@ struct phy_driver {
@@ -569,6 +569,12 @@ struct phy_driver {
*/
int (*did_interrupt)(struct phy_device *phydev);