Project

General

Profile

Actions

Feature #8009

open

Model for module_param()

Added by Anton Vasilyev over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
03/03/2017
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

module_param(name, type, perm).
Note that if a parameter is changed by sysfs, the value of that parameter as seen by your module changes, but your module is not notified in any other way. You should probably not make module parameters writable, unless you are prepared to detect the change and react accordingly. (http://www.makelinux.net/ldd3/chp-2-sect-8)

This behaviour could lead to different errors.

Example: http://lxr.free-electrons.com/source/drivers/tty/serial/8250/8250_core.c?v=4.10#L1197
nr_uarts is verified on module_init()->serial8250_isa_init_ports() to be less or equal UART_NR.
But user with root permission cat set nr_uarts to any uint value.
Then serial8250_remove() lead to buffer overread on serial8250_ports[i].

Require model for module_param(), which will set variable 'name' (if permission allows write) to __VERIFIER_nondet at least before every handlers' call

Actions #1

Updated by Evgeny Novikov over 7 years ago

  • Category set to Environment Generation
  • Assignee changed from Evgeny Novikov to Ilja Zakharov

Looks to be a very good challenge for modeling environment.

Actions #2

Updated by Evgeny Novikov over 7 years ago

  • Project changed from Linux Driver Verification to Klever
  • Category deleted (Environment Generation)
Actions

Also available in: Atom PDF