Bug 25180 - iw wrongly formatting output for IBSS (Ad Hoc) access points
Summary: iw wrongly formatting output for IBSS (Ad Hoc) access points
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2019-07-25 21:25 CEST by w unruh
Modified: 2019-08-12 23:09 CEST (History)
3 users (show)

See Also:
Source RPM: iw-5.0-1.mga7.src.rpm
CVE:
Status comment:


Attachments
iw output (33.51 KB, text/plain)
2019-07-25 21:27 CEST, w unruh
Details
iwlist output at same location and almost same time (24.87 KB, text/plain)
2019-07-25 21:31 CEST, w unruh
Details

Description w unruh 2019-07-25 21:25:00 CEST
Description of problem: The output of iw is badly formatted. and does not distinguish itself from succeeding BSS,


Version-Release number of selected component (if applicable): iw 5.0-1.mga7



How reproducible: always in my case I do not have a lot of examples.


Steps to Reproduce:
1. Find somewhere with an ad-Hoc (IBSS) location and run iw

Output from iw 

....
BSS f6:63:9f:d1:f9:17(on wlp58s0)
        TSF: 0 usec (0d, 00:00:00)
        freq: 2437
        beacon interval: 100 TUs
        capability: IBSS ShortPreamble (0x0022)
        signal: -69.00 dBm
        last seen: 6040 ms ago
        Information elements from Probe Response frame:
        SSID: hpsetup
        Supported rates: 1.0* 2.0* 5.5* 11.0*
        DS Parameter set: channel 6
        IBSS ATIM window: 0 TUsBSS 34:31:c4:39:63:ef(on wlp58s0)
        TSF: 18437528569 usec (0d, 05:07:17)
        freq: 2462
        beacon interval: 100 TUs
        capability: ESS Privacy ShortPreamble ShortSlotTime RadioMeasure (0x1431)
        signal: -84.00 dBm
        last seen: 5610 ms ago
        Information elements from Probe Response frame:
        SSID: Skynet
        Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0* 9.0 12.0* 18.0
        DS Parameter set: channel 11
        Country: DE     Environment: Indoor/Outdoor
.....

Note the line
        IBSS ATIM window: 0 TUsBSS 34:31:c4:39:63:ef(on wlp58s0)

That BSS after TUs is the start of the next AP, not part of the SSID:hpsetup
entry.

While the man page warns against screenscraping, I am sure this does not extend to this kind of bug-- Ie I doubt this was done on purpose.
Comment 1 w unruh 2019-07-25 21:27:14 CEST
Created attachment 11211 [details]
iw output

Full output of iw at this location
Comment 2 w unruh 2019-07-25 21:31:17 CEST
Created attachment 11212 [details]
iwlist output at same location and almost same time

iwlist scan
output at same location and almost (within 20 sec) same time.
Comment 3 Marja Van Waes 2019-07-26 09:09:54 CEST
I can't think of a reason why our iw output would be different than upstream's, but assigning to our iw maintainer in case he doesn't think this is an upstream issue.

Assignee: bugsquad => tmb
CC: (none) => marja11

Comment 4 w unruh 2019-07-26 10:46:06 CEST
Johannes Berg upstream says he has pushed a fix which I presume will come out in the next version.  Here is the git entry:


author	Johannes Berg <johannes.berg@intel.com>	2019-07-26 09:18:11 +0200
committer	Johannes Berg <johannes.berg@intel.com>	2019-07-26 09:18:11 +0200
commit	08c3f7d32f3bc35362f903f461befc636d3b8e47 (patch)
tree	fb71e32296715ab95537f5331b8f6aeff3ab4d48
parent	c741be9f6ca34411c4dbeb03dd13e0dd794713a5 (diff)
download	iw-master.tar.gz
iw: scan: add missing newlineHEADmaster
There was a missing newline after the ATIM window print, add it.

Change-Id: I3fba9d1bcd0015a622379c4f9f6c43df225877a6
Reported-by: Bill Unruh <unruh@physics.ubc.ca>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat
-rw-r--r--	scan.c	2	
1 files changed, 1 insertions, 1 deletions
diff --git a/scan.c b/scan.c
index 6ad3ad4..1418da7 100644
--- a/scan.c
+++ b/scan.c
@@ -1384,7 +1384,7 @@ static void print_tim(const uint8_t type, uint8_t len, const uint8_t *data,
 static void print_ibssatim(const uint8_t type, uint8_t len, const uint8_t *data,
 			   const struct print_ies_data *ie_buffer)
 {
-	printf(" %d TUs", (data[1] << 8) + data[0]);
+	printf(" %d TUs\n", (data[1] << 8) + data[0]);
 }
 
 static void print_vht_capa(const uint8_t type, uint8_t len, const uint8_t *data,
Comment 5 Thomas Backlund 2019-07-26 23:08:31 CEST
There is now a  iw-5.0.1-1.1.mga7 in testing with all post 5.0.1 fixes added
Comment 6 w unruh 2019-07-27 00:24:06 CEST
Thanks.
Comment 7 Thomas Backlund 2019-07-27 21:49:49 CEST
Assigning for QA

SRPMS:
iw-5.0.1-1.1.mga7.src.rpm

i586:
iw-5.0.1-1.1.mga7.i586.rpm

x86_64:
iw-5.0.1-1.1.mga7.x86_64.rpm

Assignee: tmb => qa-bugs

Comment 8 Thomas Backlund 2019-08-08 11:42:04 CEST
Note that this one is also already in Cauldron since ~2 weeks without issues

CC: (none) => tmb

Comment 9 w unruh 2019-08-08 12:27:13 CEST
Yes, I have been using it since Jul 27, and have had no problems.
Comment 10 w unruh 2019-08-08 12:30:02 CEST
Now we just need to get Network Center to use iw rather than iwlist, and everything will be great (ie, no more discovering you cannot connect to anything if there are too many access points in a place (eg airports, hospitals, universities). But that is another issue.
Comment 11 Thomas Backlund 2019-08-08 16:43:01 CEST
Johannes finally released a new version thats is basically all what we already patched in + a few missing renporting of new features the kernel exposes, so I decided to update to it:

So they are now:

SRPMS:
iw-5.3-1.mga7.src.rpm

i586:
iw-5.3-1.mga7.i586.rpm

x86_64:
iw-5.3-1.mga7.x86_64.rpm
Comment 12 Thomas Backlund 2019-08-10 13:11:42 CEST
Advisory, added to svn:

type: bugfix
subject: Updated iw packages fix various bugs
src:
  7:
   core:
     - iw-5.3-1.mga7
description: |
  This iw update fixes various memory leeks, adds some missing error
  handling and fixes wrongly formatting output for IBSS (Ad Hoc)
  access points.

  It also updates support for features in newer kernels.
references:
 - https://bugs.mageia.org/show_bug.cgi?id=25180

Keywords: (none) => advisory

Thomas Backlund 2019-08-12 22:20:42 CEST

Whiteboard: (none) => MGA7-64-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 13 Mageia Robot 2019-08-12 23:09:26 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2019-0093.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.