Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501680 > unrolled thread

Re: linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor error checking ?

Started byLuca Coelho <luca@coelho.fi>
First post2016-10-17 10:00 +0200
Last post2016-10-17 10:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re:  linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor  error checking ? Luca Coelho <luca@coelho.fi> - 2016-10-17 10:00 +0200

#1501680 — Re: linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor error checking ?

FromLuca Coelho <luca@coelho.fi>
Date2016-10-17 10:00 +0200
SubjectRe: linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor error checking ?
Message-ID<staZZ-A3-77@gated-at.bofh.it>
Hi David,
On Mon, 2016-10-17 at 07:40 +0000, David Binderman wrote:
> Hello there,
> 
> linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561]: (style) Checking if unsigned variable 'len' is less than zero.
> 
> Source code is
> 
>     len = min((size_t)le32_to_cpu(rsp->len) << 2,
>           iwl_rx_packet_payload_len(hcmd.resp_pkt) - sizeof(*rsp));
>     len = min(len - delta, count);
>     if (len < 0) {
>         ret = -EFAULT;
>         goto out;
>     }
> 
> Suggest improve error checking.

Thanks for reporting! A fix for this is already queued in our internal
tree and will be sent upstream soon.

--
Cheers,
Luca.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web