| 1 |
From: Gordon Malm <gengor@gentoo.org>
|
| 2 |
|
| 3 |
Add offender's IP to PAX_REFCOUNT log messages if it is available.
|
| 4 |
|
| 5 |
--- a/fs/exec.c
|
| 6 |
+++ b/fs/exec.c
|
| 7 |
@@ -1710,7 +1710,13 @@ void pax_report_fault(struct pt_regs *re
|
| 8 |
#ifdef CONFIG_PAX_REFCOUNT
|
| 9 |
void pax_report_refcount_overflow(struct pt_regs *regs)
|
| 10 |
{
|
| 11 |
- printk(KERN_ERR "PAX: refcount overflow detected in: %s:%d, uid/euid: %u/%u\n",
|
| 12 |
+#ifdef CONFIG_GRKERNSEC
|
| 13 |
+ if (current->signal->curr_ip)
|
| 14 |
+ printk(KERN_ERR "PAX: From %u.%u.%u.%u: refcount overflow detected in: %s:%d, uid/euid: %u/%u\n",
|
| 15 |
+ NIPQUAD(current->signal->curr_ip), current->comm, task_pid_nr(current), current->uid, current->euid);
|
| 16 |
+ else
|
| 17 |
+#endif
|
| 18 |
+ printk(KERN_ERR "PAX: refcount overflow detected in: %s:%d, uid/euid: %u/%u\n",
|
| 19 |
current->comm, task_pid_nr(current), current->uid, current->euid);
|
| 20 |
print_symbol(KERN_ERR "PAX: refcount overflow occured at: %s\n", instruction_pointer(regs));
|
| 21 |
show_registers(regs);
|