From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject malicious code and rewrite the return address on the stack to point to that code. This is a common concern when using functions (such as sscanf) that blindly copy data from one area
Tag: linux-device-driver
How to create a simple sysfs class attribute in Linux kernel v3.2
I’m learning how to use sysfs in my Linux modules, but I’m having the hardest time finding current documentation on these topics. The Linux Device Drivers 3rd Edition book I’ve been using seems to be rather dated in this area unfortunately (e.g. the class_device structure appears to be completely gone in current Linux versions). I’m simply trying to get an
Linux driver for embedded Linux
I’m looking to attach some USB devices to my embedded Linux board. It is an TI-ARM processor running embedded Linux, but I guess it could be any embedded Linux board. If I purchase an USB device which has Linux support/driver, can this driver (generally) be re-compiled to work with the ARM architecture? (Instead of Windows ect.). Answer Yes, USB drivers
How to extract the MAC address of an interface from witthin a driver code
I’m new to Linux Kernel programming and driver programming. I’m working with madwifi drivers, on Linux with kernel version 2.6.32-37 and wish to extract the MAC address of an interface inside the driver code. I know this information supposed to be found in the netdevice structure fields, but not quite sure which one of them is the right one. My
kprobe vs uprobe system call interposition
I want to write a system call interposition by using Utrace. I understood that Utrace project has been abandoned, but part of its code is used on kprobe and uprobe. I haven’t understood really well how these work. Especially uprobe Can you explain what difference exists between them? And can I use uprobe without writing a module to check which
Distinguish forwarding traffic and locally originated traffic in Linux network driver
Is there any information in the struct skbuff to distinguish between the forwarding traffic (bridge forwarding and ip forwarding) and locally originated traffic? We want to treat these two kinds of traffic differently in the network driver because the forwarding traffic do not require cache invalidation on the whole packet size. Any suggestions are appreciated. Thank you very much! Answer
Linux readw and readl endianness
May anyone please explain the endianness of returned values by readw and readl. I am currently using PowerPC arch. Thanks and Best Regards! Answer “readw” and “readl” return the value of the underlying architecture. As it happens, a PowerPC can be either big- or little endian. AFAIK, most Linux implementations run PPC in big-endian mode.