Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10874 closed defect (fixed)

kfree on static memory from wrt160nl_parse_partitions on linux-3.2

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

Description

In wrt160nl_part.c, function wrt160nl_parse_partitions sets the
out parameter *pparts to trx_parts, a static variable, on success.

This function is called (indirectly) from parse_mtd_partitions,
which is called from mtd_device_parse_register, which calls kfree
on the address returned from *pparts.

This results in a crash in kfree, attempting to free static
memory. It appears wrt160nl_parse_partitions should use dynamic
allocation for its parts array, rather than static allocation.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to juhosg
  • Status changed from new to assigned

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

FWIW, with this fixed, linux-3.2 from openwrt trunk boots and
appears to run great on a linksys wrt160nl.

comment:3 Changed 6 years ago by juhosg

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r29970. Thanks!

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.