Bug 2445 - Out of bounds array access in MinstrelHtWifiManager::SetBestProbabilityRate
Out of bounds array access in MinstrelHtWifiManager::SetBestProbabilityRate
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3.25
All All
: P3 major
Assigned To: sebastien.deronne
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-20 09:10 UTC by Alexander Krotov
Modified: 2016-07-12 16:24 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch (1.01 KB, patch)
2016-06-20 09:18 UTC, Alexander Krotov
Details | Diff
Patch proposed v2 (664 bytes, patch)
2016-06-27 07:38 UTC, Matías Richart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Krotov 2016-06-20 09:10:25 UTC
group->m_maxProbRate is not converted to group index before using. It results in out of bounds read access:
http://code.nsnam.org/ns-3-dev/file/d44748d98fe6/src/wifi/model/minstrel-ht-wifi-manager.cc#l1433

Patch follows.
Comment 1 Alexander Krotov 2016-06-20 09:18:17 UTC
Created attachment 2476 [details]
Proposed patch
Comment 2 sebastien.deronne 2016-06-23 03:05:17 UTC
Matias, could you please have a look?
Comment 3 Matías Richart 2016-06-27 07:37:41 UTC
The patch is correct, there is an error there.
I modified the patch so as to use an existent variable.
Comment 4 Matías Richart 2016-06-27 07:38:10 UTC
Created attachment 2486 [details]
Patch proposed v2
Comment 5 sebastien.deronne 2016-06-28 16:34:53 UTC
ok for me
Comment 6 sebastien.deronne 2016-07-12 16:24:25 UTC
Final patch pushed in changeset 12187:c5db6c9be200