stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.18 001/113] cifs: check if SMB2 PDU size has been padded and suppress the warning
@ 2018-08-30 18:01 Sasha Levin
  2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 002/113] hfsplus: don't return 0 when fill_super() failed Sasha Levin
                   ` (64 more replies)
  0 siblings, 65 replies; 72+ messages in thread
From: Sasha Levin @ 2018-08-30 18:01 UTC (permalink / raw)
  To: stable@vger.kernel.org; +Cc: Ronnie Sahlberg, Steven French, Sasha Levin

From: Ronnie Sahlberg <lsahlber@redhat.com>

[ Upstream commit e6c47dd0da1e3a484e778046fc10da0b20606a86 ]

Some SMB2/3 servers, Win2016 but possibly others too, adds padding
not only between PDUs in a compound but also to the final PDU.
This padding extends the PDU to a multiple of 8 bytes.

Check if the unexpected length looks like this might be the case
and avoid triggering the log messages for :

  "SMB2 server sent bad RFC1001 len %d not %d\n"

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 fs/cifs/smb2misc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 3ff7cec2da81..239215dcc00b 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -240,6 +240,13 @@ smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *srvr)
 		if (clc_len == len + 1)
 			return 0;
 
+		/*
+		 * Some windows servers (win2016) will pad also the final
+		 * PDU in a compound to 8 bytes.
+		 */
+		if (((clc_len + 7) & ~7) == len)
+			return 0;
+
 		/*
 		 * MacOS server pads after SMB2.1 write response with 3 bytes
 		 * of junk. Other servers match RFC1001 len to actual
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2018-09-02 17:12 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-30 18:01 [PATCH AUTOSEL 4.18 001/113] cifs: check if SMB2 PDU size has been padded and suppress the warning Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 002/113] hfsplus: don't return 0 when fill_super() failed Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 003/113] hfs: prevent crash on exit from failed search Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 004/113] sunrpc: Don't use stack buffer with scatterlist Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 005/113] fork: don't copy inconsistent signal handler state to child Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 006/113] fs/proc/vmcore.c: hide vmcoredd_mmap_dumps() for nommu builds Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 007/113] reiserfs: change j_timestamp type to time64_t Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 008/113] iommu/rockchip: Handle errors returned from PM framework Sasha Levin
2018-09-02  7:47   ` Marc Zyngier
2018-09-02 12:56     ` Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 009/113] hfsplus: fix NULL dereference in hfsplus_lookup() Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 010/113] iommu/rockchip: Move irq request past pm_runtime_enable Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 011/113] fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 012/113] fat: validate ->i_start before using Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 013/113] mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 014/113] workqueue: skip lockdep wq dependency in cancel_work_sync() Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 015/113] workqueue: re-add lockdep dependencies for flushing Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 016/113] scripts: modpost: check memory allocation results Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 017/113] apparmor: fix an error code in __aa_create_ns() Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 018/113] virtio: pci-legacy: Validate queue pfn Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 019/113] x86/mce: Add notifier_block forward declaration Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 020/113] i2c: core: ACPI: Make acpi_gsb_i2c_read_bytes() check i2c_transfer return value Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 021/113] IB/hfi1: Invalid NUMA node information can cause a divide by zero Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 022/113] pwm: meson: Fix mux clock names Sasha Levin
2018-08-30 18:01 ` [PATCH AUTOSEL 4.18 023/113] perf python: Fix pyrf_evlist__read_on_cpu() interface Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 024/113] powerpc/topology: Get topology for shared processors at boot Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 025/113] mm/list_lru.c: add memcg argument to list_lru_from_kmem() Sasha Levin
2018-08-30 21:38   ` Kirill Tkhai
2018-08-31 15:59     ` Greg Kroah-Hartman
2018-08-31 16:06       ` Sasha Levin
2018-08-31 16:05     ` Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 026/113] mm/fadvise.c: fix signed overflow UBSAN complaint Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 027/113] mm: make DEFERRED_STRUCT_PAGE_INIT explicitly depend on SPARSEMEM Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 028/113] fs/dcache.c: fix kmemcheck splat at take_dentry_name_snapshot() Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 029/113] platform/x86: intel_punit_ipc: fix build errors Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 030/113] bpf, sockmap: fix map elem deletion race with smap_stop_sock Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 031/113] tcp, ulp: fix leftover icsk_ulp_ops preventing sock from reattach Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 032/113] bpf, sockmap: fix sock_map_ctx_update_elem race with exist/noexist Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 033/113] net/xdp: Fix suspicious RCU usage warning Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 034/113] bpf, sockmap: fix leakage of smap_psock_map_entry Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 035/113] samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 036/113] netfilter: ip6t_rpfilter: set F_IFACE for linklocal addresses Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 037/113] s390/kdump: Fix memleak in nt_vmcoreinfo Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 038/113] ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest() Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 039/113] mfd: sm501: Set coherent_dma_mask when creating subdevices Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 040/113] netfilter: x_tables: do not fail xt_alloc_table_info too easilly Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 041/113] tracing: Handle CC_FLAGS_FTRACE more accurately Sasha Levin
2018-08-30 18:02 ` [PATCH AUTOSEL 4.18 042/113] platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360 Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 043/113] netfilter: fix memory leaks on netlink_dump_start error Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 044/113] tcp, ulp: add alias for all ulp modules Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 045/113] ubi: Initialize Fastmap checkmapping correctly Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 046/113] RDMA/hns: Fix usage of bitmap allocation functions return values Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 047/113] ACPICA: ACPICA: add status check for acpi_hw_read before assigning return value Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 048/113] perf arm spe: Fix uninitialized record error variable Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 049/113] net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 050/113] block: don't warn for flush on read-only device Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 051/113] net: hns3: Fix for phy link issue when using marvell phy driver Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 052/113] PCI: Match Root Port's MPS to endpoint's MPSS as necessary Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 053/113] drm/amd/display: Guard against null crtc in CRC IRQ Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 054/113] coccicheck: return proper error code on fail Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 055/113] perf tools: Check for null when copying nsinfo Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 056/113] f2fs: avoid race between zero_range and background GC Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 057/113] f2fs: fix avoid race between truncate " Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 058/113] RISC-V: Use KBUILD_CFLAGS instead of KCFLAGS when building the vDSO Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 059/113] irqchip/stm32: Fix init error handling Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 060/113] irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 061/113] net/9p/trans_fd.c: fix race by holding the lock Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 062/113] net/9p: fix error path of p9_virtio_probe Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 063/113] f2fs: fix to clear PG_checked flag in set_page_dirty() Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 064/113] pinctrl: axp209: Fix NULL pointer dereference after allocation Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 065/113] bpf: fix bpffs non-array map seq_show issue Sasha Levin
2018-08-30 18:03 ` [PATCH AUTOSEL 4.18 066/113] powerpc/uaccess: Enable get_user(u64, *p) on 32-bit Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).