Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: oliver.heid at siemens.com (Heid Oliver)
Subject: buffer overflow in srm_env_write?!
Date: Fri, 11 Mar 2005 13:23:28 +0100	[thread overview]
Message-ID: <850F2E3B91BCD611A3FC00508B94988A0567B469@erlh908a.med.siemens.de> (raw)

Shouldn't

	if (copy_from_user(buf, buffer, count))
		goto out;
	buf[count] = '\0';

	ret1 = callback_setenv(entry->id, buf, count);

read

	buf[count-1] = '\0';
          ^^^^^^^

in srm_env_write() in srm_env.c?! When I change SRM variables via
/proc/srm_environment, a trailing linefeed 0x0a is written into the
variable, which it is not when changing the variable via the SRM graphical
console itself. The above code change overwrites the linefeed with 0x0.

	Oliver



             reply	other threads:[~2005-03-11 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11 12:23 oliver.heid [this message]
2005-03-11 16:35 ` buffer overflow in srm_env_write?! rezso
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14 16:19 oliver.heid
2005-03-14 19:15 ` falk
2005-03-14 20:47   ` michal
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox