Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1934 connectés 

 

Sujet(s) à lire :
    - Who's who@Programmation
 

 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  21092  21093  21094  ..  27184  27185  27186  27187  27188  27189
Auteur Sujet :

[blabla@olympe] Le topic du modo, dieu de la fibre et du monde

n°2225702
masklinn
í dag viðrar vel til loftárása
Posté le 22-04-2014 à 12:11:28  profilanswer
 

Reprise du message précédent :

masklinn a écrit :


Si tu suis https://twitter.com/stevecheckoway ils font quand même des bêtises.

 

Par contre, je comprend pas https://twitter.com/stevecheckoway/ [...] 5430871040 c'est quoi la différence entre

Code :
  1. buf = malloc(len);
  2. if (buf) {
  3.    memset(buf, 0, len);
  4. }


et

Code :
  1. buf = calloc(1, len);


?

 

(related:

Code :
  1. authchunks = malloc(sockopt_len);
  2. memset(authchunks, 0, sizeof(sockopt_len));


)

 

self-reply: ah non le calloc et malloc+memset(0) sont bien équivalents, le problème c'est qu'il y a un malloc+memset(!0) qui est remplacé dans le commit:

Code :
  1. -        data->saved_message.data = malloc(inl);
  2. -        memcpy(data->saved_message.data, in, inl);
  3. +        data->saved_message.data = calloc(1, inl);


oops: http://freshbsd.org/commit/openbsd [...] 3eeccb4d63

Message cité 1 fois
Message édité par masklinn le 22-04-2014 à 12:12:18

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
mood
Publicité
Posté le 22-04-2014 à 12:11:28  profilanswer
 

n°2225704
___alt
Posté le 22-04-2014 à 12:15:08  profilanswer
 

Citation :

“A hack to make Visual C++ 5.0 work correctly” … time to upgrade.”

 

[:rofl]

 


(VC++ 5.0 date de 1997, yep, 17 ans)


Message édité par ___alt le 22-04-2014 à 12:16:00

---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
n°2225705
sligor
Posté le 22-04-2014 à 12:17:00  profilanswer
 

masklinn a écrit :


Si tu suis https://twitter.com/stevecheckoway ils font quand même des bêtises.
 
Par contre, je comprend pas https://twitter.com/stevecheckoway/ [...] 5430871040 c'est quoi la différence entre

Code :
  1. buf = malloc(len);
  2. if (buf) {
  3.    memset(buf, 0, len);
  4. }


et

Code :
  1. buf = calloc(1, len);


?
 
(related:

Code :
  1. authchunks = malloc(sockopt_len);
  2. memset(authchunks, 0, sizeof(sockopt_len));


 [:potemkin]  
)


 

Citation :

When you allocate a large enough region of memory (the threshold is often 1 MiB if memory serves), most allocators will get a new region of memory from the kernel using "mmap" just for that region. However, when "mmap" gives you new pages of memory, they have to be initialized to zero (when using MAP_ANONYMOUS). If they weren't, they'd be filled with all sorts of junk from other applications — and this is a serious security vulnerability. What if root was editing /etc/shadow with those pages? The same also applies if "malloc" runs out of memory for small allocations and calls "sbrk" to get more.
 
But it would take too long to zero all that memory. The kernel cheats. There is a page of memory already zeroed set aside. All pages in the new allocation point at this one page of physical ram, which is shared among all processes on the system, so it doesn't actually use any memory. It's marked as read-only. As soon as you write to it, the processor raises an exception. The kernel's exception handler then grabs a page of RAM (possibly swapping something else out), fills it with zeroes, and maps it into your process's address space. The "calloc" function can exploit this.


 
en gros je pense que le risque c'est de générer une exception quand on écrit dans le buffer alloué avec calloc et de rendre vulnérable donc le code à une timing-attack ( http://en.wikipedia.org/wiki/Timing_attack ).
je ne vois que ça...
 

masklinn a écrit :


 
self-reply: ah non le calloc et malloc+memset(0) sont bien équivalents, le problème c'est qu'il y a un malloc+memset(!0) qui est remplacé dans le commit:

Code :
  1. -        data->saved_message.data = malloc(inl);
  2. -        memcpy(data->saved_message.data, in, inl);
  3. +        data->saved_message.data = calloc(1, inl);


oops: http://freshbsd.org/commit/openbsd [...] 3eeccb4d63


OK, je suis allé trop loin dans mon analyse  :D


Message édité par sligor le 22-04-2014 à 12:18:17

---------------
qwerty-fr
n°2225707
gilou
Modosaurus Rex
Posté le 22-04-2014 à 12:19:58  profilanswer
 

Oui, en fait, il y avait un bon remplacement de data->saved_message.data = malloc(inl); par data->saved_message.data = calloc(1, inl); et simplement la ligne suivante, memcpy(data->saved_message.data, in, inl); a sauté en même temps que la première, sans que celui qui faisait la modification s'en rende compte.
 
A+,


---------------
There's more than what can be linked! --  Le capitaine qui ne veut pas obéir à la carte finira par obéir aux récifs. -- Il ne faut plus dire Sarkozy, mais Sarkozon -- (╯°□°)╯︵ ┻━┻
n°2225709
masklinn
í dag viðrar vel til loftárása
Posté le 22-04-2014 à 12:25:40  profilanswer
 

gilou a écrit :

Oui, en fait, il y avait un bon remplacement de data->saved_message.data = malloc(inl); par data->saved_message.data = calloc(1, inl); et simplement la ligne suivante, memcpy(data->saved_message.data, in, inl); a sauté en même temps que la première, sans que celui qui faisait la modification s'en rende compte.

 

A+,


Le remplacement est pas considéré "bon" puisqu'il a été reverté, je présume qu'ils ont fait tourner un script pour trouver/remplacer des paires de malloc+memset par calloc. Si tu regardes les commits ils n'ont pas (encore) l'air de remplacer tous les malloc par calloc, uniquement les malloc + bzero.

 

Sur les malloc seuls ils ne font qu'enlever les casts.


Message édité par masklinn le 22-04-2014 à 12:26:13

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°2225710
Shinuza
This is unexecpected
Posté le 22-04-2014 à 12:42:48  profilanswer
 

nraynaud a écrit :


donc tu cherches une montre alors tu prends un GPS ? du coup l'autonomie n'est pas la même du tout.

Je suis preneur de conseils, leurs autres modèles (de cette marque) ont moins bonne réputation


Message édité par Shinuza le 22-04-2014 à 12:48:28

---------------
Mains power can kill, and it will hurt the entire time you’re dying from it.
n°2225712
gilou
Modosaurus Rex
Posté le 22-04-2014 à 12:46:19  profilanswer
 

Oui, je ne voyais pas le remplacement introduire d'erreur, c'est ce que j'ai voulu dire par bon, mais en y réfléchissant à deux fois, c'était un remplacement inutile, puisque le memcpy qui suit réécrit toute la zone, la RAZ ne sert donc à rien.
 
A+,
 


---------------
There's more than what can be linked! --  Le capitaine qui ne veut pas obéir à la carte finira par obéir aux récifs. -- Il ne faut plus dire Sarkozy, mais Sarkozon -- (╯°□°)╯︵ ┻━┻
n°2225716
flo850
moi je
Posté le 22-04-2014 à 13:35:58  profilanswer
 

Les smiley dans la réponse rapide, c'est nouveau ?


---------------

n°2225717
kadreg
profil: Utilisateur
Posté le 22-04-2014 à 13:36:35  profilanswer
 

;) :whistle: :love: :lol: :lol: :lol: :hello:


---------------
brisez les rêves des gens, il en restera toujours quelque chose...  -- laissez moi troller sur discu !
n°2225718
sligor
Posté le 22-04-2014 à 13:36:55  profilanswer
 

flo850 a écrit :

Les smiley dans la réponse rapide, c'est nouveau ?


non, non, ça a toujours été là, tu remarques à peine ?


Message édité par sligor le 22-04-2014 à 13:37:14

---------------
qwerty-fr
mood
Publicité
Posté le 22-04-2014 à 13:36:55  profilanswer
 

n°2225719
___alt
Posté le 22-04-2014 à 13:37:54  profilanswer
 

:cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:


---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
n°2225720
nraynaud
lol
Posté le 22-04-2014 à 13:44:27  profilanswer
 

:whistle: :sweat: :sarcastic: :kaola:


---------------
trainoo.com, c'est fini
n°2225721
nraynaud
lol
Posté le 22-04-2014 à 13:45:07  profilanswer
 

http://stkr.es/s/zpc http://stkr.es/s/zpg http://stkr.es/s/zph http://stkr.es/s/zpj


---------------
trainoo.com, c'est fini
n°2225722
Dion
Acceuil
Posté le 22-04-2014 à 13:48:30  profilanswer
 

sligor a écrit :


Je pense qu'il n'avaient pas le choix pour le fork, il font une lib qui ne tournera que sur un système compatible POSIX. C'est un peu égoïste, mais d'un autre côté ça réduit fortement sa complexité.

Citation :

Theo de Raadt, founder and leader of the OpenBSD and OpenSSH, tells ZDNet that the project has already removed 90,000 lines of C code and 150,000 lines of content. de Raadt: "Some of that is indentation, because we are trying to make the code more comprehensible. 99.99% of the community does not care for VMS support, and 98% do not care for Windows support. They care for POSIX support, so that the Unix and Unix derivatives can run. They don't care for FIPS. Code must be simple. Even after all those changes, the codebase is still API compatible. Our entire ports tree (8700 applications) continue to compile and work, after all these changes."



 :(  :(  :(


---------------
It is not called show art
n°2225723
Elmoricq
Posté le 22-04-2014 à 13:49:53  profilanswer
 

flo850 a écrit :

Les smiley dans la réponse rapide, c'est nouveau ?


http://forum.hardware.fr/hfr/Discu [...] 8785_1.htm

n°2225724
nraynaud
lol
Posté le 22-04-2014 à 13:59:05  profilanswer
 

Dion a écrit :


 :(  :(  :(


si j'ai bien compris les petites lignes, c'est les vieux windows dont il parle.


---------------
trainoo.com, c'est fini
n°2225725
nraynaud
lol
Posté le 22-04-2014 à 14:00:21  profilanswer
 

quelqu'un pourrait m'envoyer un mail sur trainoo.com et un autre sur nraynaud.com svp ? (séparément, en me le disant ici, n'importe quoi comme préfixe)


---------------
trainoo.com, c'est fini
n°2225726
Dion
Acceuil
Posté le 22-04-2014 à 14:03:06  profilanswer
 

nraynaud a écrit :

quelqu'un pourrait m'envoyer un mail sur trainoo.com et un autre sur nraynaud.com svp ? (séparément, en me le disant ici, n'importe quoi comme préfixe)


 [:yann39]


---------------
It is not called show art
n°2225728
nraynaud
lol
Posté le 22-04-2014 à 14:05:37  profilanswer
 

dion > super, merci
 
 
(j'en reviens pas, j'ai réussi à faire un acte d'administration qui marche [:pingouino], bon il m'a fallu quelques tempt pour me rendre compte que j'avais niqué le mail de 2 domaines quand même)


---------------
trainoo.com, c'est fini
n°2225729
masklinn
í dag viðrar vel til loftárása
Posté le 22-04-2014 à 14:08:22  profilanswer
 

nraynaud a écrit :


si j'ai bien compris les petites lignes, c'est les vieux windows dont il parle.


Les nouveaux Windows sont pas plus POSIX que les anciens, donc pour le moment il parle de tous les windows. Genre http://anoncvs.estpak.ee/cgi-bin/c [...] 5e50418066 AFAIK il n'y a toujours pas de SIGPIPE sous Windows. Et ils ont dégagé le backend CryptoAPI.

 

Sur plus long terme, ça va être comme OpenSSH je présume (si ca fizzle pas), ils commencent par nettoyer et moderniser le code en BSD-only, puis ils portent petit à petit.


Message édité par masklinn le 22-04-2014 à 14:13:17

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°2225732
nraynaud
lol
Posté le 22-04-2014 à 14:18:29  profilanswer
 

Hum ok.
 
Quelqu'un pour mater mon CV en mp svp ?


---------------
trainoo.com, c'est fini
n°2225734
Sylfurd
UUUURUTORAMAN §§
Posté le 22-04-2014 à 14:20:24  profilanswer
 

fépété :o


---------------
NNiD: Sylfurd
n°2225735
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-04-2014 à 14:21:10  profilanswer
 

Oh putain le machin feeligo tout moche.


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°2225736
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-04-2014 à 14:21:50  profilanswer
 

nraynal, si je peux t'aider pour le CV, no soucÿ, balance :jap:


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°2225737
nraynaud
lol
Posté le 22-04-2014 à 14:26:53  profilanswer
 

Taiche a écrit :

nraynal, si je peux t'aider pour le CV, no soucÿ, balance :jap:


si ça peut aider ma candidature, je tiens à signaler que j'ai des ancêtres qui dealaient du diamant à Anvers si tu vois ce que je veux dire ...


---------------
trainoo.com, c'est fini
n°2225738
gfive
Posté le 22-04-2014 à 14:27:04  profilanswer
 

nraynaud a écrit :

Hum ok.
 
Quelqu'un pour mater mon CV en mp svp ?


 
Vazy :o


---------------
Tous les sud africains sont ségrégationistes, à part Ted. (P. Desproges)
n°2225739
Dion
Acceuil
Posté le 22-04-2014 à 14:29:02  profilanswer
 

nraynaud a écrit :


si ça peut aider ma candidature, je tiens à signaler que j'ai des ancêtres qui dealaient du diamant à Anvers si tu vois ce que je veux dire ...


Quand il t'a mp qu'il voulait voir ton pénis c'était pas ça qu'il recherchait :/


---------------
It is not called show art
n°2225741
ixemul
Nan mais sans blague ! ⚡
Posté le 22-04-2014 à 14:49:07  profilanswer
 

Taiche a écrit :

Oh putain le machin feeligo tout moche.


 
http://stkr.es/p/zu2


---------------
VA APPRENDRE ET REVIENS QUAND TU SAIS, SINON ABSTIENT TOI C'EST UN GRAND CONSEIL QUE JE TE DONNE... TU ES INCOMPÉTENT ET C'EST UNE RÉALITÉ, TU N'AS RIEN A FAIRE ICI FAUT S'Y CONNAITRE ... -Jojo1998 - RIP - http://tinyurl.com/qc47ftk
n°2225742
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-04-2014 à 14:51:16  profilanswer
 

nraynaud a écrit :

si ça peut aider ma candidature, je tiens à signaler que j'ai des ancêtres qui dealaient du diamant à Anvers si tu vois ce que je veux dire ...


Si t'as leur nom, probable que mon oncle Moché les connaisse [:romf]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°2225743
theShockWa​ve
I work at a firm named Koslow
Posté le 22-04-2014 à 15:27:03  profilanswer
 

http://reho.st/self/e66e54e860737b80941d88cb9962113759a13559.png
J'ai mal à ma ram.


---------------
last.fm
n°2225747
nraynaud
lol
Posté le 22-04-2014 à 16:30:47  profilanswer
 

en tout cas il y a une question qui fait l'unanimité: mon CV est moche.


---------------
trainoo.com, c'est fini
n°2225748
___alt
Posté le 22-04-2014 à 16:31:03  profilanswer
 

http://i.imgur.com/SklnTv7.png [:rofl]


---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
n°2225749
Dion
Acceuil
Posté le 22-04-2014 à 16:36:10  profilanswer
 

nraynaud a écrit :

en tout cas il y a une question qui fait l'unanimité: mon CV est moche.


gimme gimme gimme  [:agkklr]


---------------
It is not called show art
n°2225750
___alt
Posté le 22-04-2014 à 16:44:47  profilanswer
 

Dion a écrit :


gimme gimme gimme  [:agkklr]


 
Même dans les pires pays du Moyen Orient on demande pas aux femmes lapidées d'apporter les pierres.


---------------
TRIPS RIGHT BUNCH F SHUTTLE TOM AND JERRY RIGHT YELLOW
n°2225751
gfive
Posté le 22-04-2014 à 17:01:13  profilanswer
 

Ca y est, ils ont trouvé qqun qui veut nous acheter.
 
Mais pas vraiment tout ce qui était à vendre,
 
Et on sait toujours pas qui c'est :o


---------------
Tous les sud africains sont ségrégationistes, à part Ted. (P. Desproges)
n°2225752
uriel
blood pt.2
Posté le 22-04-2014 à 17:08:30  profilanswer
 

gfive a écrit :

Ca y est, ils ont trouvé qqun qui veut nous acheter.
 
Mais pas vraiment tout ce qui était à vendre,
 
Et on sait toujours pas qui c'est :o


Des chinois ou des quatari selon le figaro :O


---------------
IVG en france
n°2225754
Volkhen
Posté le 22-04-2014 à 17:20:37  profilanswer
 

Javascript, Date() :  

Citation :

(note that the month is 0-based)


 
Parce que fuck you.


---------------
Main/Alt1/Alt2/Alt3
n°2225755
ixemul
Nan mais sans blague ! ⚡
Posté le 22-04-2014 à 17:22:16  profilanswer
 

Volkhen a écrit :

Javascript, Date() :  

Citation :

(note that the month is 0-based)


 
Parce que fuck you.


 
 
C'est merveilleux [:ayuluna]


---------------
VA APPRENDRE ET REVIENS QUAND TU SAIS, SINON ABSTIENT TOI C'EST UN GRAND CONSEIL QUE JE TE DONNE... TU ES INCOMPÉTENT ET C'EST UNE RÉALITÉ, TU N'AS RIEN A FAIRE ICI FAUT S'Y CONNAITRE ... -Jojo1998 - RIP - http://tinyurl.com/qc47ftk
n°2225756
Sylfurd
UUUURUTORAMAN §§
Posté le 22-04-2014 à 17:26:11  profilanswer
 

un classique, idem dans le Calendar Java ...


---------------
NNiD: Sylfurd
n°2225757
gfive
Posté le 22-04-2014 à 17:26:32  profilanswer
 

Volkhen a écrit :

Javascript, Date() :  

Citation :

(note that the month is 0-based)


 
Parce que fuck you.


 
Fais gaffe aux DST dans le passé, hein :o


---------------
Tous les sud africains sont ségrégationistes, à part Ted. (P. Desproges)
n°2225760
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 22-04-2014 à 17:32:00  profilanswer
 

gfive a écrit :

Fais gaffe aux DST dans le passé, hein :o


Ou même dans le présent en Arizona [:cosmoschtroumpf]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  21092  21093  21094  ..  27184  27185  27186  27187  27188  27189

Aller à :
Ajouter une réponse
 

Sujets relatifs
Plus de sujets relatifs à : [blabla@olympe] Le topic du modo, dieu de la fibre et du monde


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)