Linux 4.14.267
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.267 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/sysctl/kernel.txt | 21 ++++++++ Makefile | 2 arch/arm/boot/dts/imx23-evk.dts | 1 arch/arm/boot/dts/imx6qdl-udoo.dtsi | 5 + arch/arm/boot/dts/meson.dtsi | 8 +-- drivers/hwmon/dell-smm-hwmon.c | 12 +++- drivers/mmc/host/sdhci-of-esdhc.c | 8 ++- drivers/net/bonding/bond_3ad.c | 3 - drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 3 + drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 --- drivers/net/phy/marvell.c | 7 +- drivers/staging/fbtft/fbtft.h | 5 + drivers/target/iscsi/iscsi_target_tpg.c | 3 + drivers/tty/n_tty.c | 4 - drivers/tty/vt/vt_ioctl.c | 5 + drivers/usb/common/ulpi.c | 10 ++- drivers/usb/dwc2/gadget.c | 2 drivers/usb/dwc3/gadget.c | 13 +++++ drivers/usb/gadget/composite.c | 3 + drivers/usb/gadget/function/f_fs.c | 56 ++++++++++++++++------ drivers/usb/gadget/function/rndis.c | 9 ++- drivers/usb/serial/ch341.c | 1 drivers/usb/serial/cp210x.c | 2 drivers/usb/serial/ftdi_sio.c | 3 + drivers/usb/serial/ftdi_sio_ids.h | 3 + drivers/usb/serial/option.c | 2 fs/nfs/callback.h | 2 fs/nfs/callback_proc.c | 2 fs/nfs/callback_xdr.c | 18 +++---- fs/nfs/client.c | 2 fs/nfs/nfs4_fs.h | 3 - fs/nfs/nfs4client.c | 5 + fs/nfs/nfs4namespace.c | 4 - fs/nfs/nfs4state.c | 3 + fs/nfs/nfs4xdr.c | 9 +-- fs/nfsd/nfs3proc.c | 5 + fs/nfsd/nfs4proc.c | 5 + include/net/dst_metadata.h | 14 +++++ init/Kconfig | 10 +++ kernel/bpf/syscall.c | 3 - kernel/events/core.c | 4 - kernel/seccomp.c | 10 +++ kernel/sysctl.c | 29 +++++++++-- net/ipv4/ipmr.c | 2 net/ipv6/ip6mr.c | 2 net/tipc/name_distr.c | 2 security/integrity/ima/ima_fs.c | 2 security/integrity/ima/ima_template.c | 10 ++- security/integrity/integrity_audit.c | 2 50 files changed, 260 insertions(+), 91 deletions(-)
Amelie Delaunay (1):
usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
Antoine Tenart (2):
net: do not keep the dst cache when uncloning an skb dst and its metadata
net: fix a memleak when uncloning an skb dst and its metadata
Armin Wolf (1):
hwmon: (dell-smm) Speed up setting of fan speed
Cameron Williams (1):
USB: serial: ftdi_sio: add support for Brainboxes US-159/235/320
Chuck Lever (1):
NFSD: Clamp WRITE offsets
Daniel Borkmann (1):
bpf: Add kconfig knob for disabling unpriv bpf by default
Eric Dumazet (1):
ipmr,ip6mr: acquire RTNL before calling ip[6]mr_free_table() on failure path
Fabio Estevam (2):
ARM: dts: imx23-evk: Remove MX23_PAD_SSP1_DETECT from hog group
ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
Greg Kroah-Hartman (2):
usb: gadget: rndis: check size of RNDIS_MSG_SET command Linux 4.14.267
Jakob Koschel (2):
vt_ioctl: fix array_index_nospec in vt_setactivate
vt_ioctl: add array_index_nospec to VT_ACTIVATE
Jiasheng Jiang (1):
mmc: sdhci-of-esdhc: Check for error num after setting mask
Jisheng Zhang (1):
net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()
Johan Hovold (2):
USB: serial: cp210x: add NCR Retail IO box id
USB: serial: cp210x: add CPI Bulk Coin Recycler idJon Maloy (1):
tipc: rate limit warning for received illegal binding update
Kees Cook (1):
seccomp: Invalidate seccomp mode to catch death failures
Mahesh Bandewar (1):
bonding: pair enable_port with slave_arr_updates
Martin Blumenstingl (1):
ARM: dts: meson: Fix the UART compatible strings
Olga Kornievskaia (3):
NFSv4 only print the label when its queried
NFSv4 remove zero number of fs_locations entries error check NFSv4 expose nfs_parse_server_name function
Pavel Parkhomenko (1):
net: phy: marvell: Fix MDI-x polarity setting in 88e1118-compatible PHYs
Pawel Dembicki (1):
USB: serial: option: add ZTE MF286D modem
Raju Rangoju (1):
net: amd-xgbe: disable interrupts during pci removal
Roberto Sassu (1):
ima: Allow template selection with ima_template[_fmt]= after ima_hash=
Sasha Levin (1):
Revert "net: axienet: Wait for PhyRstCmplt after core reset"
Sean Anderson (2):
usb: ulpi: Move of_node_put to ulpi_dev_release
usb: ulpi: Call of_node_put correctly
Song Liu (1):
perf: Fix list corruption in perf_cgroup_switch()
Stefan Berger (1):
ima: Remove ima_policy file before directory
Stephan Brunner (1):
USB: serial: ch341: add support for GW Instek USB2.0-Serial devices
Szymon Heidrich (1):
USB: gadget: validate interface OS descriptor requests
TATSUKAWA KOSUKE (立川 江介) (1):
n_tty: wake up poll(POLLRDNORM) on receiving data
Trond Myklebust (2):
NFS: Fix initialisation of nfs_client cl_flags field NFSv4.1: Fix uninitialised variable in devicenotify
Udipto Goswami (2):
usb: f_fs: Fix use-after-free for epfile
usb: dwc3: gadget: Prevent core from processing stale TRBs
Uwe Kleine-König (1):
staging: fbtft: Fix error path in fbtft_driver_module_init()
Xiaoke Wang (2):
integrity: check the return value of audit_log_start()
nfs: nfs4clinet: check the return value of kstrdup()
ZouMingzhe (1):
scsi: target: iscsi: Make sure the np under each tpg is unique
Greg Kroah-Hartman
maintainerDocumentation/sysctl/kernel.txt +21 -0
@@ -91,6 +91,7 @@ show up in /proc/sys/kernel: - sysctl_writes_strict - tainted - threads-max +- unprivileged_bpf_disabled - unknown_nmi_panic - watchdog - watchdog_thresh
@@ -999,6 +1000,26 @@ available RAM pages threads-max is reduced accordingly. ============================================================== +unprivileged_bpf_disabled: + +Writing 1 to this entry will disable unprivileged calls to bpf(); +once disabled, calling bpf() without CAP_SYS_ADMIN will return +-EPERM. Once set to 1, this can't be cleared from the running kernel +anymore. + +Writing 2 to this entry will also disable unprivileged calls to bpf(), +however, an admin can still change this setting later on, if needed, by +writing 0 or 1 to this entry. + +If BPF_UNPRIV_DEFAULT_OFF is enabled in the kernel config, then this +entry will default to 2 instead of 0. + + 0 - Unprivileged calls to bpf() are enabled + 1 - Unprivileged calls to bpf() are disabled without recovery + 2 - Unprivileged calls to bpf() are disabled + +============================================================== + unknown_nmi_panic: The value in this file affects behavior of handling NMI. When the
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 266 +SUBLEVEL = 267 EXTRAVERSION = NAME = Petit Gorille
arch/arm/boot/dts/imx23-evk.dts +0 -1
@@ -48,7 +48,6 @@ MX23_PAD_LCD_RESET__GPIO_1_18 MX23_PAD_PWM3__GPIO_1_29 MX23_PAD_PWM4__GPIO_1_30 - MX23_PAD_SSP1_DETECT__SSP1_DETECT >; fsl,drive-strength = <MXS_DRIVE_4mA>; fsl,voltage = <MXS_VOLTAGE_HIGH>;
arch/arm/boot/dts/imx6qdl-udoo.dtsi +4 -1
@@ -9,6 +9,8 @@ * */ +#include <dt-bindings/gpio/gpio.h> + / { aliases { backlight = &backlight;
@@ -201,6 +203,7 @@ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 + MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0 >; };
@@ -267,7 +270,7 @@ &usdhc3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usdhc3>; - non-removable; + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/meson.dtsi +4 -4
@@ -86,14 +86,14 @@ }; uart_A: serial@84c0 { - compatible = "amlogic,meson6-uart", "amlogic,meson-uart"; + compatible = "amlogic,meson6-uart"; reg = <0x84c0 0x18>; interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; status = "disabled"; }; uart_B: serial@84dc { - compatible = "amlogic,meson6-uart", "amlogic,meson-uart"; + compatible = "amlogic,meson6-uart"; reg = <0x84dc 0x18>; interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>; status = "disabled";
@@ -131,7 +131,7 @@ }; uart_C: serial@8700 { - compatible = "amlogic,meson6-uart", "amlogic,meson-uart"; + compatible = "amlogic,meson6-uart"; reg = <0x8700 0x18>; interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>; status = "disabled";
@@ -196,7 +196,7 @@ }; uart_AO: serial@4c0 { - compatible = "amlogic,meson6-uart", "amlogic,meson-ao-uart", "amlogic,meson-uart"; + compatible = "amlogic,meson6-uart", "amlogic,meson-ao-uart"; reg = <0x4c0 0x18>; interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>; status = "disabled";
drivers/hwmon/dell-smm-hwmon.c +8 -4
@@ -294,7 +294,7 @@ static int i8k_get_fan_nominal_speed(int fan, int speed) }/* -* Set the fan speed (off, low, high). Returns the new fan status. +* Set the fan speed (off, low, high, ...). */ static int i8k_set_fan (int fan,int speed) {
@@ -303,7 +303,7 @@ static int i8k_set_fan(int fan, int speed) speed = (speed <0 ) ?0 : ((speed > i8k_fan_max) ? i8k_fan_max : speed); regs.ebx = (fan &0xff ) | (speed <<8 ); -return i8k_smm (®s) ? :i8k_get_fan_status (fan); +return i8k_smm (®s); }static int i8k_get_temp_type (int sensor)
@@ -417,7 +417,7 @@ static int i8k_ioctl_unlocked(struct file *fp, unsigned int cmd, unsigned long arg) { int val = 0; -int speed; +int speed, err;unsigned char buff[16 ];int __user *argp = (int __user *)arg;
@@ -478,7 +478,11 @@ i8k_ioctl_unlocked(struct file *fp, unsigned int cmd, unsigned long arg)if (copy_from_user (&speed, argp +1 ,sizeof (int )))return -EFAULT ; - val =i8k_set_fan (val, speed); + err =i8k_set_fan (val, speed); +if (err <0 ) +return err; + + val =i8k_get_fan_status (val);break ;default :
drivers/mmc/host/sdhci-of-esdhc.c +6 -2
@@ -427,12 +427,16 @@ static void esdhc_of_adma_workaround(struct sdhci_host *host, u32 intmask)static int esdhc_of_enable_dma (struct sdhci_host *host) { +int ret;u32 value;struct device *dev =mmc_dev (host->mmc);if (of_device_is_compatible (dev->of_node,"fsl,ls1043a-esdhc" ) || -of_device_is_compatible (dev->of_node,"fsl,ls1046a-esdhc" )) -dma_set_mask_and_coherent (dev,DMA_BIT_MASK (40 )); +of_device_is_compatible (dev->of_node,"fsl,ls1046a-esdhc" )) { + ret =dma_set_mask_and_coherent (dev,DMA_BIT_MASK (40 )); +if (ret) +return ret; + } value =sdhci_readl (host,ESDHC_DMA_SYSCTL );
drivers/net/bonding/bond_3ad.c +2 -1
@@ -1012,8 +1012,8 @@ static void ad_mux_machine(struct port *port, bool *update_slave_arr)if (port->aggregator && port->aggregator->is_active && !__port_is_enabled (port)) { -__enable_port (port); + *update_slave_arr = true; } }break ;
@@ -1760,6 +1760,7 @@ static void ad_agg_selection_logic(struct aggregator *agg, port = port->next_port_in_aggregator) {__enable_port (port); } + *update_slave_arr = true; } }
drivers/net/ethernet/amd/xgbe/xgbe-pci.c +3 -0
@@ -400,6 +400,9 @@ static void xgbe_pci_remove(struct pci_dev *pdev)pci_free_irq_vectors (pdata->pcidev); +/* Disable all interrupts in the hardware */ +XP_IOWRITE (pdata,XP_INT_EN ,0x0 ); +xgbe_free_pdata (pdata); }
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -1
@@ -630,7 +630,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv)if (err) {dev_err (priv->device,"EMAC reset timeout\n" ); -return -EFAULT ; +return err; }return 0 ; }
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +0 -10
@@ -279,16 +279,6 @@ static int axienet_dma_bd_init(struct net_device *ndev)axienet_dma_out32 (lp,XAXIDMA_TX_CR_OFFSET , cr |XAXIDMA_CR_RUNSTOP_MASK ); -/* Wait for PhyRstCmplt bit to be set, indicating the PHY reset has finished */ - ret =read_poll_timeout (axienet_ior, value, - value &XAE_INT_PHYRSTCMPLT_MASK , -DELAY_OF_ONE_MILLISEC ,50000 , false, lp, -XAE_IS_OFFSET ); -if (ret) { -dev_err (lp->dev,"%s: timeout waiting for PhyRstCmplt\n" , __func__); -return ret; - } -return 0 ; out:axienet_dma_bd_release (ndev);
drivers/net/phy/marvell.c +3 -4
@@ -907,16 +907,15 @@ static int m88e1118_config_aneg(struct phy_device *phydev) {int err; - err =genphy_soft_reset (phydev); + err =marvell_set_polarity (phydev, phydev->mdix_ctrl);if (err <0 )return err; - err =marvell_set_polarity (phydev, phydev->mdix_ctrl); + err =genphy_config_aneg (phydev);if (err <0 )return err; - err =genphy_config_aneg (phydev); -return 0 ; +return genphy_soft_reset (phydev); }static int m88e1118_config_init (struct phy_device *phydev)
drivers/staging/fbtft/fbtft.h +4 -1
@@ -342,7 +342,10 @@ static int __init fbtft_driver_module_init(void) \ ret =spi_register_driver (&fbtft_driver_spi_driver); \if (ret <0 ) \return ret; \ -return platform_driver_register (&fbtft_driver_platform_driver); \ + ret =platform_driver_register (&fbtft_driver_platform_driver); \ +if (ret <0 ) \ +spi_unregister_driver (&fbtft_driver_spi_driver); \ +return ret; \ } \ \ static void __exit fbtft_driver_module_exit(void) \
drivers/target/iscsi/iscsi_target_tpg.c +3 -0
@@ -448,6 +448,9 @@ static bool iscsit_tpg_check_network_portal(break ; }spin_unlock (&tpg->tpg_np_lock); + +if (match) +break ; }spin_unlock (&tiqn->tiqn_tpg_lock);
drivers/tty/n_tty.c +2 -2
@@ -1377,7 +1377,7 @@ n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)put_tty_queue (c, ldata);smp_store_release (&ldata->canon_head, ldata->read_head);kill_fasync (&tty->fasync,SIGIO ,POLL_IN ); -wake_up_interruptible_poll (&tty->read_wait,POLLIN ); +wake_up_interruptible_poll (&tty->read_wait,POLLIN |POLLRDNORM );return 0 ; } }
@@ -1658,7 +1658,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,if (read_cnt (ldata)) {kill_fasync (&tty->fasync,SIGIO ,POLL_IN ); -wake_up_interruptible_poll (&tty->read_wait,POLLIN ); +wake_up_interruptible_poll (&tty->read_wait,POLLIN |POLLRDNORM ); } }
drivers/tty/vt/vt_ioctl.c +3 -2
@@ -691,6 +691,7 @@ int vt_ioctl(struct tty_struct *tty, ret = -ENXIO ; else { arg--; + arg =array_index_nospec (arg,MAX_NR_CONSOLES );console_lock (); ret =vc_allocate (arg);console_unlock ();
@@ -715,9 +716,9 @@ int vt_ioctl(struct tty_struct *tty,if (vsa.console ==0 || vsa.console >MAX_NR_CONSOLES ) ret = -ENXIO ;else { - vsa.console =array_index_nospec (vsa.console, -MAX_NR_CONSOLES +1 ); vsa.console--; + vsa.console =array_index_nospec (vsa.console, +MAX_NR_CONSOLES );console_lock (); ret =vc_allocate (vsa.console);if (ret ==0 ) {
drivers/usb/common/ulpi.c +7 -3
@@ -135,6 +135,7 @@ static const struct attribute_group *ulpi_dev_attr_groups[] = {static void ulpi_dev_release (struct device *dev) { +of_node_put (dev->of_node);kfree (to_ulpi_dev (dev)); }
@@ -251,12 +252,16 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi)return ret; ret =ulpi_read_id (ulpi); -if (ret) +if (ret) { +of_node_put (ulpi->dev.of_node);return ret; + } ret =device_register (&ulpi->dev); -if (ret) +if (ret) { +put_device (&ulpi->dev);return ret; + }dev_dbg (&ulpi->dev,"registered ULPI PHY: vendor %04x, product %04x\n" , ulpi->id.vendor, ulpi->id.product);
@@ -303,7 +308,6 @@ EXPORT_SYMBOL_GPL(ulpi_register_interface);*/ void ulpi_unregister_interface (struct ulpi *ulpi) { -of_node_put (ulpi->dev.of_node);device_unregister (&ulpi->dev); }EXPORT_SYMBOL_GPL (ulpi_unregister_interface);
drivers/usb/dwc2/gadget.c +1 -1
@@ -4783,7 +4783,7 @@ int dwc2_hsotg_suspend(struct dwc2_hsotg *hsotg) hsotg->gadget.speed =USB_SPEED_UNKNOWN ;spin_unlock_irqrestore (&hsotg->lock, flags); -for (ep =0 ; ep < hsotg->num_of_eps; ep++) { +for (ep =1 ; ep < hsotg->num_of_eps; ep++) {if (hsotg->eps_in[ep])dwc2_hsotg_ep_disable (&hsotg->eps_in[ep]->ep);if (hsotg->eps_out[ep])
drivers/usb/dwc3/gadget.c +13 -0
@@ -1004,6 +1004,19 @@ static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb,if (usb_endpoint_xfer_bulk (dep->endpoint.desc) && dep->stream_capable) trb->ctrl |=DWC3_TRB_CTRL_SID_SOFN (stream_id); +/* +* As per data book 4.2.3.2TRB Control Bit Rules section +* +* The controller autonomously checks the HWO field of a TRB to determine if the +* entire TRB is valid. Therefore, software must ensure that the rest of the TRB +* is valid before setting the HWO field to '1'. In most systems, this means that +* software must update the fourth DWORD of a TRB last. +* +* However there is a possibility of CPU re-ordering here which can cause +* controller to observe the HWO bit set prematurely. +* Add a write memory barrier to prevent CPU re-ordering. +*/ +wmb (); trb->ctrl |=DWC3_TRB_CTRL_HWO ;dwc3_ep_inc_enq (dep);
drivers/usb/gadget/composite.c +3 -0
@@ -1940,6 +1940,9 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)if (w_index !=0x5 || (w_value >>8 ))break ; interface = w_value &0xFF ; +if (interface >=MAX_CONFIG_INTERFACES || + !os_desc_cfg->interface[interface]) +break ; buf[6 ] = w_index;if (w_length ==0x0A ) { count = count_ext_prop(os_desc_cfg,
drivers/usb/gadget/function/f_fs.c +42 -14
98 lines not on this page · raw message
drivers/usb/gadget/function/rndis.c +6 -3
@@ -640,14 +640,17 @@ static int rndis_set_response(struct rndis_params *params,rndis_set_cmplt_type *resp;rndis_resp_t *r; + BufLength =le32_to_cpu (buf->InformationBufferLength); + BufOffset =le32_to_cpu (buf->InformationBufferOffset); +if ((BufLength >RNDIS_MAX_TOTAL_SIZE ) || + (BufOffset +8 >=RNDIS_MAX_TOTAL_SIZE )) +return -EINVAL ; + r =rndis_add_response (params,sizeof (rndis_set_cmplt_type));if (!r)return -ENOMEM ; resp = (rndis_set_cmplt_type *)r->buf; - BufLength =le32_to_cpu (buf->InformationBufferLength); - BufOffset =le32_to_cpu (buf->InformationBufferOffset); -#ifdef VERBOSE_DEBUG pr_debug ("%s: Length: %d\n" , __func__, BufLength);pr_debug ("%s: Offset: %d\n" , __func__, BufOffset);
drivers/usb/serial/ch341.c +1 -0
@@ -87,6 +87,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1a86, 0x5523) }, { USB_DEVICE(0x1a86, 0x7522) }, { USB_DEVICE(0x1a86, 0x7523) }, + { USB_DEVICE(0x2184, 0x0057) }, { USB_DEVICE(0x4348, 0x5523) }, { USB_DEVICE(0x9986, 0x7523) }, { },
drivers/usb/serial/cp210x.c +2 -0
@@ -55,6 +55,7 @@ static int cp210x_port_remove(struct usb_serial_port *);static void cp210x_dtr_rts (struct usb_serial_port *p,int on);static const struct usb_device_id id_table[] = { + {USB_DEVICE (0x0404 ,0x034C ) },/* NCR Retail IO Box */ {USB_DEVICE (0x045B ,0x0053 ) },/* Renesas RX610 RX-Stick */ {USB_DEVICE (0x0471 ,0x066A ) },/* AKTAKOM ACE-1001 cable */ {USB_DEVICE (0x0489 ,0xE000 ) },/* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
@@ -72,6 +73,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0FCF, 0x1004) }, /* Dynastream ANT2USB */ { USB_DEVICE(0x0FCF, 0x1006) }, /* Dynastream ANT development board */ { USB_DEVICE(0x0FDE, 0xCA05) }, /* OWL Wireless Electricity Monitor CM-160 */ + { USB_DEVICE(0x106F, 0x0003) }, /* CPI / Money Controls Bulk Coin Recycler */ { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */ { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */
drivers/usb/serial/ftdi_sio.c +3 -0
@@ -964,6 +964,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_023_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_034_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_101_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_159_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_1_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_2_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_3_PID) },
@@ -972,12 +973,14 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_6_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_7_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_8_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_235_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_257_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_1_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_2_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_3_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_4_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_313_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_320_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_324_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_1_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_2_PID) },
drivers/usb/serial/ftdi_sio_ids.h +3 -0
@@ -1506,6 +1506,9 @@#define BRAINBOXES_VX_023_PID 0x1003/* VX-023 ExpressCard 1 Port RS422/485 */ #define BRAINBOXES_VX_034_PID 0x1004/* VX-034 ExpressCard 2 Port RS422/485 */ #define BRAINBOXES_US_101_PID 0x1011/* US-101 1xRS232 */ +#define BRAINBOXES_US_159_PID 0x1021/* US-159 1xRS232 */ +#define BRAINBOXES_US_235_PID 0x1017/* US-235 1xRS232 */ +#define BRAINBOXES_US_320_PID 0x1019/* US-320 1xRS422/485 */ #define BRAINBOXES_US_324_PID 0x1013/* US-324 1xRS422/485 1Mbaud */ #define BRAINBOXES_US_606_1_PID 0x2001/* US-606 6 Port RS232 Serial Port 1 and 2 */ #define BRAINBOXES_US_606_2_PID 0x2002/* US-606 6 Port RS232 Serial Port 3 and 4 */
drivers/usb/serial/option.c +2 -0
@@ -1652,6 +1652,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) }, /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0x00, 0x00) }, /* ZTE MF871A */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1485, 0xff, 0xff, 0xff), /* ZTE MF286D */ + .driver_info = RSVD(5) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
fs/nfs/callback.h +1 -1
@@ -168,7 +168,7 @@ struct cb_devicenotifyitem { };struct cb_devicenotifyargs { -int ndevs; +uint32_t ndevs;struct cb_devicenotifyitem *devs; };
fs/nfs/callback_proc.c +1 -1
@@ -355,7 +355,7 @@ __be32 nfs4_callback_devicenotify(void *argp, void *resp, struct cb_process_state *cps) {struct cb_devicenotifyargs *args = argp; -int i; +uint32_t i;__be32 res =0 ;struct nfs_client *clp = cps->clp;struct nfs_server *server =NULL ;
fs/nfs/callback_xdr.c +9 -9
@@ -265,11 +265,9 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp, void *argp) {struct cb_devicenotifyargs *args = argp; +uint32_t tmp, n, i;__be32 *p;__be32 status =0 ; -u32 tmp; -int n, i; - args->ndevs =0 ;/* Num of device notifications */ p =read_buf (xdr,sizeof (uint32_t ));
@@ -278,7 +276,7 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp, goto out; } n =ntohl (*p++); -if (n <=0 ) +if (n ==0 ) goto out;if (n >ULONG_MAX /sizeof (*args->devs)) { status =htonl (NFS4ERR_BADXDR );
@@ -336,19 +334,21 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp, dev->cbd_immediate =0 ; } - args->ndevs++; -dprintk ("%s: type %d layout 0x%x immediate %d\n" , __func__, dev->cbd_notify_type, dev->cbd_layout_type, dev->cbd_immediate); } + args->ndevs = n; +dprintk ("%s: ndevs %d\n" , __func__, args->ndevs); +return 0 ; +err: +kfree (args->devs); out: + args->devs =NULL ; + args->ndevs =0 ;dprintk ("%s: status %d ndevs %d\n" , __func__,ntohl (status), args->ndevs);return status; -err: -kfree (args->devs); - goto out; } static __be32 decode_sessionid(struct xdr_stream *xdr,
fs/nfs/client.c +1 -1
@@ -179,6 +179,7 @@ struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init)INIT_LIST_HEAD (&clp->cl_superblocks); clp->cl_rpcclient =ERR_PTR (-EINVAL ); + clp->cl_flags = cl_init->init_flags; clp->cl_proto = cl_init->proto; clp->cl_net =get_net (cl_init->net);
@@ -426,7 +427,6 @@ struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_init)list_add_tail (&new->cl_share_link, &nn->nfs_client_list);spin_unlock (&nn->nfs_client_lock); - new->cl_flags = cl_init->init_flags;return rpc_ops->init_client (new, cl_init); }
fs/nfs/nfs4_fs.h +2 -1
@@ -242,7 +242,8 @@ struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *, struct nfs_fh *, struct nfs_fattr *);int nfs4_replace_transport (struct nfs_server *server,const struct nfs4_fs_locations *locations); - +size_t nfs_parse_server_name (char *string,size_t len,struct sockaddr *sa, +size_t salen,struct net *net);/* nfs4proc.c */ extern int nfs4_handle_exception (struct nfs_server *,int ,struct nfs4_exception *); extern int nfs4_call_sync(struct rpc_clnt *, struct nfs_server *,
fs/nfs/nfs4client.c +4 -1
@@ -1241,8 +1241,11 @@ int nfs4_update_server(struct nfs_server *server, const char *hostname, }nfs_put_client (clp); -if (server->nfs_client->cl_hostname ==NULL ) +if (server->nfs_client->cl_hostname ==NULL ) { server->nfs_client->cl_hostname =kstrdup (hostname,GFP_KERNEL ); +if (server->nfs_client->cl_hostname ==NULL ) +return -ENOMEM ; + }nfs_server_insert_lists (server);return nfs_probe_destination (server);
fs/nfs/nfs4namespace.c +2 -2
@@ -121,8 +121,8 @@ static int nfs4_validate_fspath(struct dentry *dentry,return 0 ; } -static size_t nfs_parse_server_name (char *string,size_t len, -struct sockaddr *sa,size_t salen,struct net *net) +size_t nfs_parse_server_name (char *string,size_t len,struct sockaddr *sa, +size_t salen,struct net *net) {ssize_t ret;
fs/nfs/nfs4state.c +3 -0
@@ -2003,6 +2003,9 @@ static int nfs4_try_migration(struct nfs_server *server, struct rpc_cred *cred) } result = -NFS4ERR_NXIO ; +if (!locations->nlocations) + goto out; +if (!(locations->fattr.valid &NFS_ATTR_FATTR_V4_LOCATIONS )) {dprintk ("<-- %s: No fs_locations data, migration skipped\n" , __func__);
fs/nfs/nfs4xdr.c +4 -5
@@ -3731,8 +3731,6 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, stif (unlikely (!p)) goto out_overflow; n =be32_to_cpup (p); -if (n <=0 ) - goto out_eio;for (res->nlocations =0 ; res->nlocations < n; res->nlocations++) {u32 m;struct nfs4_fs_location *loc;
@@ -4272,10 +4270,11 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap, }else printk (KERN_WARNING "%s: label too long (%u)!\n" , __func__, len); +if (label && label->label) +dprintk ("%s: label=%.*s, len=%d, PI=%d, LFS=%d\n" , + __func__, label->len, (char *)label->label, + label->len, label->pi, label->lfs); } -if (label && label->label) -dprintk ("%s: label=%s, len=%d, PI=%d, LFS=%d\n" , __func__, - (char *)label->label, label->len, label->pi, label->lfs);return status; out_overflow:
fs/nfsd/nfs3proc.c +5 -0
@@ -199,6 +199,11 @@ nfsd3_proc_write(struct svc_rqst *rqstp) (unsigned long long ) argp->offset, argp->stable? " stable" : ""); + resp->status = nfserr_fbig; +if (argp->offset > (u64 )OFFSET_MAX || + argp->offset + argp->len > (u64 )OFFSET_MAX ) +return rpc_success; +fh_copy (&resp->fh, &argp->fh); resp->committed = argp->stable; nfserr = nfsd_write(rqstp, &resp->fh, argp->offset,
fs/nfsd/nfs4proc.c +3 -2
@@ -1015,8 +1015,9 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,unsigned long cnt;int nvecs; -if (write->wr_offset >=OFFSET_MAX ) -return nfserr_inval; +if (write->wr_offset > (u64 )OFFSET_MAX || + write->wr_offset + write->wr_buflen > (u64 )OFFSET_MAX ) +return nfserr_fbig; status =nfs4_preprocess_stateid_op (rqstp, cstate, &cstate->current_fh, stateid,WR_STATE , &filp,NULL );
include/net/dst_metadata.h +13 -1
@@ -121,8 +121,20 @@ static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)memcpy (&new_md->u.tun_info, &md_dst->u.tun_info,sizeof (struct ip_tunnel_info ) + md_size); +#ifdef CONFIG_DST_CACHE +/* Unclone the dst cache if there is one */ +if (new_md->u.tun_info.dst_cache.cache) { +int ret; + + ret =dst_cache_init (&new_md->u.tun_info.dst_cache,GFP_ATOMIC ); +if (ret) { +metadata_dst_free (new_md); +return ERR_PTR (ret); + } + } +#endif +skb_dst_drop (skb); -dst_hold (&new_md->dst);skb_dst_set (skb, &new_md->dst);return new_md; }
init/Kconfig +10 -0
@@ -1378,6 +1378,16 @@ config ADVISE_SYSCALLS applications use these syscalls, you can disable this option to save space. +config BPF_UNPRIV_DEFAULT_OFF + bool "Disable unprivileged BPF by default" + depends on BPF_SYSCALL + help + Disables unprivileged BPF by default by setting the corresponding + /proc/sys/kernel/unprivileged_bpf_disabled knob to 2. An admin can + still reenable it by setting it to 0 later on, or permanently + disable it by setting it to 1 (from which no other transition to + 0 is possible anymore). + config USERFAULTFD bool "Enable userfaultfd() system call" select ANON_INODES
kernel/bpf/syscall.c +2 -1
@@ -37,7 +37,8 @@ static DEFINE_SPINLOCK(prog_idr_lock);static DEFINE_IDR (map_idr);static DEFINE_SPINLOCK (map_idr_lock); -int sysctl_unprivileged_bpf_disabled__read_mostly ; +int sysctl_unprivileged_bpf_disabled__read_mostly = +IS_BUILTIN (CONFIG_BPF_UNPRIV_DEFAULT_OFF ) ?2 :0 ;static const struct bpf_map_ops *const bpf_map_types[] = { #define BPF_PROG_TYPE(_id, _ops)
kernel/events/core.c +2 -2
@@ -716,7 +716,7 @@ static DEFINE_PER_CPU(struct list_head, cgrp_cpuctx_list);*/ static void perf_cgroup_switch (struct task_struct *task,int mode) { -struct perf_cpu_context *cpuctx; +struct perf_cpu_context *cpuctx, *tmp;struct list_head *list;unsigned long flags;
@@ -727,7 +727,7 @@ static void perf_cgroup_switch(struct task_struct *task, int mode)local_irq_save (flags); list =this_cpu_ptr (&cgrp_cpuctx_list); -list_for_each_entry (cpuctx, list, cgrp_cpuctx_entry) { +list_for_each_entry_safe (cpuctx, tmp, list, cgrp_cpuctx_entry) {WARN_ON_ONCE (cpuctx->ctx.nr_cgroups ==0 );perf_ctx_lock (cpuctx, cpuctx->task_ctx);
kernel/seccomp.c +10 -0
@@ -28,6 +28,9 @@#include <linux/syscalls.h> #include <linux/sysctl.h> +/* Not exposed in headers: strictly internal use only. */ +#define SECCOMP_MODE_DEAD (SECCOMP_MODE_FILTER + 1) +#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER #include <asm/syscall.h> #endif
@@ -632,6 +635,7 @@ static void __secure_computing_strict(int this_syscall)#ifdef SECCOMP_DEBUG dump_stack ();#endif + current->seccomp.mode =SECCOMP_MODE_DEAD ;seccomp_log (this_syscall,SIGKILL ,SECCOMP_RET_KILL_THREAD , true);do_exit (SIGKILL ); }
@@ -746,6 +750,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,case SECCOMP_RET_KILL_THREAD :case SECCOMP_RET_KILL_PROCESS :default : + current->seccomp.mode =SECCOMP_MODE_DEAD ;seccomp_log (this_syscall,SIGSYS , action, true);/* Dump core only if this is the last remaining thread. */ if (action == SECCOMP_RET_KILL_PROCESS ||
@@ -798,6 +803,11 @@ int __secure_computing(const struct seccomp_data *sd)return 0 ;case SECCOMP_MODE_FILTER :return __seccomp_filter (this_syscall, sd, false); +/* Surviving SECCOMP_RET_KILL_* must be proactively impossible. */ +case SECCOMP_MODE_DEAD : +WARN_ON_ONCE (1 ); +do_exit (SIGKILL ); +return -1 ;default :BUG (); }
kernel/sysctl.c +25 -4
@@ -242,6 +242,28 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write,#endif +#ifdef CONFIG_BPF_SYSCALL +static int bpf_unpriv_handler (struct ctl_table *table,int write, +void *buffer,size_t *lenp,loff_t *ppos) +{ +int ret, unpriv_enable = *(int *)table->data; +bool locked_state = unpriv_enable ==1 ; +struct ctl_table tmp = *table; + +if (write && !capable (CAP_SYS_ADMIN )) +return -EPERM ; + + tmp.data = &unpriv_enable; + ret =proc_dointvec_minmax (&tmp, write, buffer, lenp, ppos); +if (write && !ret) { +if (locked_state && unpriv_enable !=1 ) +return -EPERM ; + *(int *)table->data = unpriv_enable; + } +return ret; +} +#endif +static struct ctl_table kern_table[];static struct ctl_table vm_table[];static struct ctl_table fs_table[];
@@ -1201,10 +1223,9 @@ static struct ctl_table kern_table[] = { .data = &sysctl_unprivileged_bpf_disabled, .maxlen = sizeof(sysctl_unprivileged_bpf_disabled), .mode = 0644, - /* only handle a transition from default "0" to "1" */ - .proc_handler = proc_dointvec_minmax, - .extra1 = &one, - .extra2 = &one, + .proc_handler = bpf_unpriv_handler, + .extra1 = &zero, + .extra2 = &two, },#endif #if defined(CONFIG_TREE_RCU ) || defined(CONFIG_PREEMPT_RCU )
net/ipv4/ipmr.c +2 -0
@@ -248,7 +248,9 @@ static int __net_init ipmr_rules_init(struct net *net)return 0 ; err2: +rtnl_lock ();ipmr_free_table (mrt); +rtnl_unlock (); err1:fib_rules_unregister (ops);return err;
net/ipv6/ip6mr.c +2 -0
@@ -252,7 +252,9 @@ static int __net_init ip6mr_rules_init(struct net *net)return 0 ; err2: +rtnl_lock ();ip6mr_free_table (mrt); +rtnl_unlock (); err1:fib_rules_unregister (ops);return err;
net/tipc/name_distr.c +1 -1
@@ -288,7 +288,7 @@ static bool tipc_update_nametbl(struct net *net, struct distr_item *i,return true; } }else { -pr_warn ("Unrecognized name table message received\n" ); +pr_warn_ratelimited ("Unknown name table message received\n" ); }return false; }
security/integrity/ima/ima_fs.c +1 -1
@@ -486,11 +486,11 @@ int __init ima_fs_init(void)return 0 ; out: +securityfs_remove (ima_policy);securityfs_remove (violations);securityfs_remove (runtime_measurements_count);securityfs_remove (ascii_runtime_measurements);securityfs_remove (binary_runtime_measurements);securityfs_remove (ima_dir); -securityfs_remove (ima_policy);return -1 ; }
security/integrity/ima/ima_template.c +7 -3
@@ -31,6 +31,7 @@ static struct ima_template_desc builtin_templates[] = {static LIST_HEAD (defined_templates);static DEFINE_SPINLOCK (template_list); +static int template_setup_done;static struct ima_template_field supported_fields[] = { {.field_id ="d" , .field_init = ima_eventdigest_init,
@@ -57,10 +58,11 @@ static int __init ima_template_setup(char *str)struct ima_template_desc *template_desc;int template_len =strlen (str); -if (ima_template) +if (template_setup_done)return 1 ; -ima_init_template_list (); +if (!ima_template) +ima_init_template_list ();/* * Verify that a template with the supplied name exists.
@@ -84,6 +86,7 @@ static int __init ima_template_setup(char *str) } ima_template = template_desc; + template_setup_done =1 ;return 1 ; }__setup ("ima_template=" , ima_template_setup);
@@ -92,7 +95,7 @@ static int __init ima_template_fmt_setup(char *str) {int num_templates =ARRAY_SIZE (builtin_templates); -if (ima_template) +if (template_setup_done)return 1 ;if (template_desc_init_fields (str,NULL ,NULL ) <0 ) {
@@ -103,6 +106,7 @@ static int __init ima_template_fmt_setup(char *str) builtin_templates[num_templates -1 ].fmt = str; ima_template = builtin_templates + num_templates -1 ; + template_setup_done =1 ;return 1 ; }
security/integrity/integrity_audit.c +2 -0
@@ -39,6 +39,8 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,return ; ab =audit_log_start (current->audit_context,GFP_KERNEL , audit_msgno); +if (!ab) +return ; audit_log_format(ab, "pid=%d uid=%u auid=%u ses=%u", task_pid_nr(current), from_kuid(&init_user_ns, current_cred()->uid),