linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 5.10 20/43] rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request
Date: Fri, 22 Jan 2021 15:12:36 +0100	[thread overview]
Message-ID: <20210122135736.478632128@linuxfoundation.org> (raw)
In-Reply-To: <20210122135735.652681690@linuxfoundation.org>

From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>

[ Upstream commit e56b3d94d939f52d46209b9e1b6700c5bfff3123 ]

MSFT ActiveSync implementation requires that the size of the response for
incoming query is to be provided in the request input length. Failure to
set the input size proper results in failed request transfer, where the
ActiveSync counterpart reports the NDIS_STATUS_INVALID_LENGTH (0xC0010014L)
error.

Set the input size for OID_GEN_PHYSICAL_MEDIUM query to the expected size
of the response in order for the ActiveSync to properly respond to the
request.

Fixes: 039ee17d1baa ("rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Link: https://lore.kernel.org/r/20210108095839.3335-1-andrey.zhizhikin@leica-geosystems.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/rndis_host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -387,7 +387,7 @@ generic_rndis_bind(struct usbnet *dev, s
 	reply_len = sizeof *phym;
 	retval = rndis_query(dev, intf, u.buf,
 			     RNDIS_OID_GEN_PHYSICAL_MEDIUM,
-			     0, (void **) &phym, &reply_len);
+			     reply_len, (void **)&phym, &reply_len);
 	if (retval != 0 || !phym) {
 		/* OID is optional so don't fail here. */
 		phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED);



  parent reply	other threads:[~2021-01-22 14:33 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 14:12 [PATCH 5.10 00/43] 5.10.10-rc1 review Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 01/43] Revert "kconfig: remove kvmconfig and xenconfig shorthands" Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 02/43] bpf: Fix selftest compilation on clang 11 Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 03/43] x86/hyperv: Initialize clockevents after LAPIC is initialized Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 04/43] drm/amdgpu/display: drop DCN support for aarch64 Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 05/43] bpf: Fix signed_{sub,add32}_overflows type handling Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 06/43] X.509: Fix crash caused by NULL pointer Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 07/43] nfsd4: readdirplus shouldnt return parent of export Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 08/43] bpf: Dont leak memory in bpf getsockopt when optlen == 0 Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 09/43] bpf: Support PTR_TO_MEM{,_OR_NULL} register spilling Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 10/43] bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 11/43] net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 12/43] net: fix use-after-free when UDP GRO with shared fraglist Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 13/43] udp: Prevent reuseport_select_sock from reading uninitialized socks Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 14/43] netxen_nic: fix MSI/MSI-x interrupts Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 15/43] net: ipv6: Validate GSO SKB before finish IPv6 processing Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 16/43] tipc: fix NULL deref in tipc_link_xmit() Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 17/43] mlxsw: core: Add validation of transceiver temperature thresholds Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 18/43] mlxsw: core: Increase critical threshold for ASIC thermal zone Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 19/43] net: mvpp2: Remove Pause and Asym_Pause support Greg Kroah-Hartman
2021-01-22 14:12 ` Greg Kroah-Hartman [this message]
2021-01-22 14:12 ` [PATCH 5.10 21/43] esp: avoid unneeded kmap_atomic call Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 22/43] net: dcb: Validate netlink message in DCB handler Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 23/43] net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 24/43] rxrpc: Call state should be read with READ_ONCE() under some circumstances Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 25/43] i40e: fix potential NULL pointer dereferencing Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 26/43] net: stmmac: Fixed mtu channged by cache aligned Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 27/43] net: sit: unregister_netdevice on newlinks error path Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 28/43] net: stmmac: fix taprio schedule configuration Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 29/43] net: stmmac: fix taprio configuration when base_time is in the past Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 30/43] net: avoid 32 x truesize under-estimation for tiny skbs Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 31/43] dt-bindings: net: renesas,etheravb: RZ/G2H needs tx-internal-delay-ps Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 32/43] net: phy: smsc: fix clk error handling Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 33/43] net: dsa: clear devlink port type before unregistering slave netdevs Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 34/43] rxrpc: Fix handling of an unsupported token type in rxrpc_read() Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 35/43] net: stmmac: use __napi_schedule() for PREEMPT_RT Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 36/43] can: mcp251xfd: mcp251xfd_handle_rxif_one(): fix wrong NULL pointer check Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 37/43] drm/panel: otm8009a: allow using non-continuous dsi clock Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 38/43] mac80211: do not drop tx nulldata packets on encrypted links Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 39/43] mac80211: check if atf has been disabled in __ieee80211_schedule_txq Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 40/43] net: dsa: unbind all switches from tree when DSA master unbinds Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 41/43] cxgb4/chtls: Fix tid stuck due to wrong update of qid Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 42/43] spi: fsl: Fix driver breakage when SPI_CS_HIGH is not set in spi->mode Greg Kroah-Hartman
2021-01-22 14:12 ` [PATCH 5.10 43/43] spi: cadence: cache reference clock rate during probe Greg Kroah-Hartman
2021-01-23  0:24 ` [PATCH 5.10 00/43] 5.10.10-rc1 review Shuah Khan
2021-01-23 15:06   ` Greg Kroah-Hartman
2021-01-23  5:44 ` Naresh Kamboju
2021-01-23  7:20   ` Naresh Kamboju
2021-01-23 15:06     ` Greg Kroah-Hartman
2021-01-23  9:52 ` Pavel Machek
2021-01-23 15:06   ` Greg Kroah-Hartman
2021-01-23 14:36 ` Guenter Roeck
2021-01-23 15:07   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210122135736.478632128@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).