#19768: iwinfo: segmentation fault while reading mtd.
-----------------------+------------------------
 Reporter:  anonymous  |      Owner:  developers
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:
Component:  packages   |    Version:  Trunk
 Keywords:             |
-----------------------+------------------------
 iwinfo produces a segmentation fault while reading the mtd device (when
 querying for the hardware id).

 I think the problem here is that you're attempting to store negative
 values in an unsigned int.

 iwinfo_utils.c: 181  unsigned int len, off;
 will cause the for loop on line 209 to always pass, causing a read off the
 start
 of the mmap'd buffer.
 iwinfo_utils.c: 209  for (off = len / 2 - 0x800; off >= 0; off -= 0x800)

 Also, lines 193 and 202 are problematic.
 iwinfo_utils.c: 193  off = -1;
 iwinfo_utils.c: 202  if(off < 0)

--
Ticket URL: <https://dev.openwrt.org/ticket/19768>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to