nl80211: fix corrupt scan results from wpa_supplicant#30
Open
wryun wants to merge 1 commit intoopenwrt:masterfrom
Open
nl80211: fix corrupt scan results from wpa_supplicant#30wryun wants to merge 1 commit intoopenwrt:masterfrom
wryun wants to merge 1 commit intoopenwrt:masterfrom
Conversation
Without clearing the scanlist entries, it was possible to have bad
data remaining from previous calls in the ht_operation/vht_operation
fields (not set here). This could cause segfaults in rpcd's iwinfo
module, as it was possible that (a) the primary_chan would not be 0
and therefore (b) you would use bad data for chan_width etc. as an
index into short-ish array:
if (e->ht_chan_info.primary_chan) {
t = blobmsg_open_table(&buf, "ht_operation");
blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
blobmsg_close_table(&buf, t);
}
Signed-off-by: James Haggerty <james.haggerty@morsemicro.com>
|
@wryun: Nice PR :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without clearing the scanlist entries, it was possible to have bad data remaining from previous calls in the ht_operation/vht_operation fields (not set here). This could cause segfaults in rpcd's iwinfo module, as it was possible that (a) the primary_chan would not be 0 and therefore (b) you would use bad data for chan_width etc. as an index into short-ish array: