Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10986 closed defect (wontfix)

hostapd continually writing same 12 bytes to /dev/random

Reported by: Basil Nutmeg <basil+openwrt@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

hostapd constantly writing an effectively fixed 12-byte
string to /dev/random many times per second on my router.
This can be seen with strace, for example:

# pidof hostapd
7640
# strace -p 7640
[...]
open("/dev/random", O_RDWR) = 12
write(12, "\0\0\0\0\0\0\0\n\0\0\0\0", 12) = 12
close(12) = 0
[...]
open("/dev/random", O_RDWR) = 12
write(12, "\0\0\0\0\0\0\0\n\0\0\0\0", 12) = 12
close(12) = 0
[...]
open("/dev/random", O_RDWR) = 12
write(12, "\0\0\0\0\0\0\0\n\0\0\0\0", 12) = 12
close(12) = 0
[...]
open("/dev/random", O_RDWR) = 12
write(12, "\0\0\0\0\0\0\0\n\0\0\0\0", 12) = 12
close(12) = 0
[...]

My router happens to be in the proximity of several other
unrelated routers, so there's a constant churn of beacons and
probe requests, and it appears these are what's triggering
these events.

This may be partly an upstream hostapd problem; hostapd_mgmt_rx
in src/ap/drv_callbacks.c calls random_add_randomness for
each mgmt frame it processes, passing in the hostapd_frame_info
object, which doesn't appear to have much entropy.

The writes to /dev/random are added in this OpenWRT patch:
package/hostapd/patches/700-random_pool_add_kernel.patch

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Cybjit <cybjit@…>

I am seeing the same thing. But when my devices connect or scan for networks, some actual data is written instead of zeros.

It should be safe to write anything to /dev/random (1). But I do not understand why it would be a good thing unless it is somewhat random.

(1) http://lkml.indiana.edu/hypermail/linux/kernel/0012.2/0502.html

comment:2 Changed 6 years ago by Basil Nutmeg <basil+openwrt@…>

Ah, I see. Then this issue is basically harmless. I'd close this
ticket now, but trac seems to decline me the option.

comment:3 Changed 6 years ago by nbd

  • Resolution set to wontfix
  • Status changed from new to closed

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.