[2.4] off-by-one kmalloc in ntfs
diff mbox series

Message ID 20040213225621.GA16550@gondor.apana.org.au
State New, archived
Headers show
Series
  • [2.4] off-by-one kmalloc in ntfs
Related show

Commit Message

Herbert Xu Feb. 13, 2004, 10:56 p.m. UTC
This patch fixes an off-by-one kmalloc bug in ntfs in 2.4.24.

Cheers,

Comments

Szabolcs Szakacsits Feb. 14, 2004, 12:47 p.m. UTC | #1
On Sat, 14 Feb 2004, Herbert Xu wrote:

> This patch fixes an off-by-one kmalloc bug in ntfs in 2.4.24.

Thanks for your time fixing bugs in the legacy driver.

May I be interested in your motivations? Recently there is a clear flow of
RedHat refugees to Debian and if you would like better NTFS support then
perhaps Debian should use the backport of the rewritten NTFS driver too,
just like all other distros do who care about NTFS support.

You can find some of the differences between the legacy (in vanilla 2.4)
and the Linux-NTFS project's NTFS driver (it's in in 2.6 and there is
a backport maintained for 2.4):

	http://linux-ntfs.sourceforge.net/status.html

Besides the several drawbacks vanila 2.4 driver has, I'm aware of only two
features it's capable but not the rewritten one:

   - NTFS can be exported via NFS. This came without any work but it would 
     need some time to support with the new driver. There was one request
     for this feature in the last two years so it's not the highest priority
   
   - one can trash his/her NTFS or the box (the legacy diver is not SMP,
     reentrant safe). AFAIK, no plan to add this feature to the new driver 
     neither in the short nor in long term.

  Szaka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Anton Altaparmakov Feb. 15, 2004, 1:26 a.m. UTC | #2
On Sat, 14 Feb 2004, Szakacsits Szabolcs wrote:
> On Sat, 14 Feb 2004, Herbert Xu wrote:
> > This patch fixes an off-by-one kmalloc bug in ntfs in 2.4.24.
> Thanks for your time fixing bugs in the legacy driver.
>
> May I be interested in your motivations? Recently there is a clear flow of
> RedHat refugees to Debian and if you would like better NTFS support then
> perhaps Debian should use the backport of the rewritten NTFS driver too,
> just like all other distros do who care about NTFS support.
>
> You can find some of the differences between the legacy (in vanilla 2.4)
> and the Linux-NTFS project's NTFS driver (it's in in 2.6 and there is
> a backport maintained for 2.4):
>
> 	http://linux-ntfs.sourceforge.net/status.html
>
> Besides the several drawbacks vanila 2.4 driver has, I'm aware of only two
> features it's capable but not the rewritten one:
>
>    - NTFS can be exported via NFS. This came without any work but it would
>      need some time to support with the new driver. There was one request
>      for this feature in the last two years so it's not the highest priority

The to be released NTFS 2.0.7 for 2.6 kernel adds support for exporting
via NFS.  (-:  Unfortunately last week the hd at my computer at work blew
up so I didn't get round to doing my final testing so I haven't officially
released 2.0.7 yet but hopefully I will release it next week.  Assuming
2.4 now uses the same mechanism for exporting via NFS (I am not sure if
the 2.6 changes were backported or not) it will be easy to update the NTFS
backport with this feature.

>    - one can trash his/her NTFS or the box (the legacy diver is not SMP,
>      reentrant safe). AFAIK, no plan to add this feature to the new driver
>      neither in the short nor in long term.

Yes, most definitely we have no intention of implementing that feature in
the new driver! (-:

Best regards,

	Anton
Anton Altaparmakov Feb. 15, 2004, 1:36 a.m. UTC | #3
On Sun, 15 Feb 2004, Anton Altaparmakov wrote:

> On Sat, 14 Feb 2004, Szakacsits Szabolcs wrote:
> > On Sat, 14 Feb 2004, Herbert Xu wrote:
> > > This patch fixes an off-by-one kmalloc bug in ntfs in 2.4.24.
> > Thanks for your time fixing bugs in the legacy driver.
> >
> > May I be interested in your motivations? Recently there is a clear flow of
> > RedHat refugees to Debian and if you would like better NTFS support then
> > perhaps Debian should use the backport of the rewritten NTFS driver too,
> > just like all other distros do who care about NTFS support.
> >
> > You can find some of the differences between the legacy (in vanilla 2.4)
> > and the Linux-NTFS project's NTFS driver (it's in in 2.6 and there is
> > a backport maintained for 2.4):
> >
> > 	http://linux-ntfs.sourceforge.net/status.html
> >
> > Besides the several drawbacks vanila 2.4 driver has, I'm aware of only two
> > features it's capable but not the rewritten one:
> >
> >    - NTFS can be exported via NFS. This came without any work but it would
> >      need some time to support with the new driver. There was one request
> >      for this feature in the last two years so it's not the highest priority
>
> The to be released NTFS 2.0.7 for 2.6 kernel adds support for exporting

oops, I meant 2.1.7

> via NFS.  (-:  Unfortunately last week the hd at my computer at work blew
> up so I didn't get round to doing my final testing so I haven't officially
> released 2.0.7 yet but hopefully I will release it next week.  Assuming

and again 2.1.7

> 2.4 now uses the same mechanism for exporting via NFS (I am not sure if
> the 2.6 changes were backported or not) it will be easy to update the NTFS
> backport with this feature.
>
> >    - one can trash his/her NTFS or the box (the legacy diver is not SMP,
> >      reentrant safe). AFAIK, no plan to add this feature to the new driver
> >      neither in the short nor in long term.
>
> Yes, most definitely we have no intention of implementing that feature in
> the new driver! (-:
>
> Best regards,
>
> 	Anton
>

Best regards,

	Anton

Patch
diff mbox series

Index: kernel-2.4/fs/ntfs/support.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/fs/ntfs/support.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 support.c
--- kernel-2.4/fs/ntfs/support.c	25 Feb 2002 19:38:09 -0000	1.1.1.9
+++ kernel-2.4/fs/ntfs/support.c	12 Feb 2004 11:13:29 -0000
@@ -240,7 +240,7 @@ 
 				NLS_MAX_CHARSET_SIZE)) > 0) {
 			/* Adjust result buffer. */
 			if (chl > 1) {
-				buf = ntfs_malloc(*out_len + chl - 1);
+				buf = ntfs_malloc(*out_len + chl);
 				if (!buf) {
 					i = -ENOMEM;
 					goto err_ret;